Sunday, 14 January 2018

How to Change Where Condition for View Object (VO) in OAF Technology

Hi Friends , In this post I am sharing you how we can change the VO where condition Dynamically through PAF page Controller.

I am creating View object as below , for Invoice Details which would show invoices for Specific suppliers. So I will change Supplier id dynamically to change LOV of Invoice Details.

if you found this post helpful and you liked it then follow this blog to get notifications for the upcoming posts.

This is the sql Query I have used which will pass Vendor id from the Controller every time.

Put this code under the controller
     public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
       OAApplicationModule am = pageContext.getApplicationModule(webBean);
       String Ntf=null;
 Integer SupplerId=null;

          ViewObject vo = am.findViewObject("InvoiceNumberVO");
          if (vo!=null) {
              pageContext.writeDiagnostics(this, "succesfully set vo InvoiceNumberVO ", 1);
              pageContext.writeDiagnostics(this, "Supplier Id "+SupplerId,1);               
          pageContext.writeDiagnostics(this, " setting whereclauseparam", 1);
          vo.setNamedWhereClauseParam("1", SupplerId);

            pageContext.writeDiagnostics(this, "InvoiceNumberVO ", 2);
If you want to see Other OAF Related Posts , Please visit Below URL.
If you want to see  Oracle Fusion Related Posts , Please visit Below URL.
If you want to Learn Oracle Workflow Builder, Please visit Below URL.


Post a Comment