Thursday, 11 July 2013

Set Multi Org Access controls  from OAF Controller:

In R12  we have to set ORG_ID to use view objects in VO.

In Your controller just paste below code to set MO:

OAApplicationModule AM = pageContext.getApplicationModule(webBean);
      OADBTransactionImpl trx = (OADBTransactionImpl)AM.getOADBTransaction(); 
       AM.getOADBTransaction().setMultiOrgAccess(String.valueOf(trx.getOrgId()),String.valueOf(trx.getSecurityProfileId()),trx.getApplicationShortName());
  AM.getOADBTransaction().setMultiOrgPolicyContext("M", AM.getOADBTransaction().getOrgId());

Tuesday, 2 July 2013

Add a new Row in OAF:

Add a new Row in OAF:
OAViewObject vo=(OAViewObject)am.findViewObject("XxdKoelContractHeadersInfoEOVO");
     if(pageContext.getParameter("addrow")!=null){
   
     Row row= vo.createRow();
     vo.insertRow(row);
      }