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");
         SupplerId=pageContext.getParameter("SupplerId");
          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);
          vo.executeQuery();

            pageContext.writeDiagnostics(this, "InvoiceNumberVO ", 2);
      //}
      }      
 
If you want to see Other OAF Related Posts , Please visit Below URL.
https://rpforacle.blogspot.in/2013/03/oaf_10.html
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.


1 comments:

Anonymous said...

Nice blog, I really like what you write in this blog, I also have some relevant Information about Best HR Training In Hyderabad | Hr training institute in Hyderabad! if you want more information.
Oracle Fusion HCM Online Training

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *