Send Mail Script

  create or replace procedure send_mail (p_to          in varchar2,

                                       p_from        in varchar2,

                                       p_message     in varchar2,

                                       p_smtp_host   in varchar2,

                                       p_smtp_port   in number default 25)

as

    l_mail_conn   utl_smtp.connection;

begin

    l_mail_conn := utl_smtp.open_connection (p_smtp_host, p_smtp_port);

    utl_smtp.helo (l_mail_conn, p_smtp_host);

    utl_smtp.mail (l_mail_conn, p_from);

    utl_smtp.rcpt (l_mail_conn, p_to);

    utl_smtp.data (l_mail_conn, p_message || utl_tcp.crlf || utl_tcp.crlf);

    utl_smtp.quit (l_mail_conn);

end;



Run Following 



begin

    send_mail (p_to          => 'xx@domain.com',

               p_from        => 'xx@domain.com',

               p_message     => 'mail Body',

               p_smtp_host   => 'hostname');

end;

Fire Partial Action Programmatically in OAF

import oracle.cabo.ui.action.FirePartialAction;


//In the Process Request

OAMessageChoiceBean xx=(OAMessageChoiceBean)webBean.findChildRecursive("xx");

FireAction firePartialAction = new FirePartialAction("xxAction");


xx.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
 

Now we will capture this Above Event "xxAction" in the Process From Request Method of the OAF Page Controller.

 //In the Process From Request
if("xxAction".equals(pageContext.getParameter(SOURCE_PARAM)))

{
     //Event Handling Here

OAF : Steps to Extend VO

1) Identify the VO which nees to extend 
2) Download all .class files from $JAVA_TOP classes folder 
3) Move those files on local machine folder under jdevhome.jdev.myproject.oracle.apps and so on 
 4) Create workspace
 5) Create Project 
6) Create Custom VO and chose Standard VO as Extention (Change SQL Query here in custom VO) 
7) Substitute Both VO standard and extended 
8) Run Project automatic class files generated 
 9) Move class files on server 
 10) Move .jpx file on Server any folder
 11) Run following command (replace xx as credentials) 

 java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxprj/oracle/apps/icx/por/IProcVOExt.jpx -username xx -password xx -dbconnection "(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST =xx)(PORT =xx))(CONNECT_DATA = (SID =xx)))"

 12) Run following comands for bounce 

 cd $AD_TOP/bin 
 Create JAR Files : adcgnjar 

 Bounce apachi web logic server 
 cd $ADMIN_SCRIPTS_HOME
 admanagedsrvctl.sh stopall oacore 

 Start apachi web logic server 
 cd $ADMIN_SCRIPTS_HOME admanagedsrvctl.sh startall oacore 

 13) Check custom VO is there on 'about this page' if there create item through personalization


OAF: Transient Attributes not getting populated in Extended VO

Standard VORowImpl getter method will be something like this : 

 public String getAttribute1(){ 
 return "Calculated Value"; } 

 Generated getter method in the extended VORowImpl will be like this: 

 public String getAttribute1() {
 return (String) getAttributeInternal("Attribute1"); } 

 To fix this, modify the getter method of the extended VORowImpl like this: 

 public String getAttribute1() { 
 //return (String) getAttributeInternal("Attribute1"); 
 return super.getAttribute1(); }

Value Sets Access Issue in R12.2 +

Through Front End 
 1. Login as SYSADMIN 
2. Navigate to 'User Management' responsibility. 
2. Query the user that you want to grant access to all value sets 
3. Grant the following role 
 Role = Flexfield Value Set Security: All 
privileges Code = UMX|FND_FLEX_VSET_ALL_PRIVS_ROLE 

 Through Backend(with apps user) 

 Begin 
 WF_LOCAL_SYNCH.PROPAGATEUSERROLE
                                                  (p_user_name => 'XXUSERNAME', 
                                                   p_role_name => 'UMX|FND_FLEX_VSET_ALL_PRIVS_ROLE'); 
 commit; end;