Thursday, 18 May 2017

Creating form value and Search button code

Form value:
  • Form values assign only used in lovmappings
  • In the messagelayoutlovinputregion item under column take form value under the form value mapping return item and criteria item giving to another form value name.
  • Passing parameters using this code.

Under this code write only co;
             
OAFormValueBean itemfv = (OAFormValueBean)webBean.findChildRecursive("ItemIDFV");

String itemno = (String)itemfv.getValue(pageContext);

Search Button:
Code For CO:

if(pageContext.getParameter("searchId")!=null){
    try{
OAFormValueBean itemfv = (OAFormValueBean)webBean.findChildRecursive("ItemIDFV");
          String itemno = (String)itemfv.getValue(pageContext);
      
          String lotnumber =  pageContext.getParameter("LOtNumber");
          String serialstart = pageContext.getParameter("serialstart");
          String serialend = pageContext.getParameter("serialend");
              
          Serializable param[] = {itemno,lotnumber,serialstart,serialend};
          am.invokeMethod("initdetails",param);
         }
         catch (Exception e) {
             OAException.wrapperException(e);
          }
      }

AMIMPL code:

    public void initdetails(String itemid, String lotnumber ,String serialstart , String serialend){
        VOImpl vo = getVO1();
        try{
            vo.clearCache();
            vo.setWhereClause(null);
            vo.setWhereClauseParam(0,itemid);
            vo.setWhereClauseParam(2,lotnumber);
            vo.setWhereClauseParam(3,serialstart);
            vo.setWhereClauseParam(4,serialend);
            vo.executeQuery();
        }
        catch(Exception e){
            throw OAException.wrapperException(e);
         }
    }

No comments:

Post a Comment

27-03-2019

                                                                  Apex Project Creation 1. Create new project and select desktop applicat...