About Me

My photo
Oracle Apps - Techno Functional consultant
Showing posts with label FORMS PERS. Show all posts
Showing posts with label FORMS PERS. Show all posts

Thursday, November 3

Form Personalization CUSTOM.PLL Examples

1.Give an welcome message when opening the standard Customer form.    if (event_name = 'WHEN-NEW-FORM-INSTANCE' and  form_name = 'AA_CUSTOMER_ADDRESS') then
         if (block_name = 'HZ_PARTIES') then
          FND_MESSAGE.SET_STRING('WELCOME');
          FND_MESSAGE.SHOW;  
          end if;
 
2. Display the alert when user create the new customer with existing name and should not be allowed to save.ElsIf (event_name = 'WHEN-NEW-ITEM-INSTANCE') then
          if (form_name = 'AA_CUSTOMER_CREATION_TEMP' and block_name ='HZ_PARTIES')then
                if(name_in('system.record_status')='INSERT') then                 
                begin
                    l_party_name :=name_in('HZ_PARTIES.PARTY_NAME');
                  if l_party_name is not null then
                     select party_name into name1 from hz_parties where party_name like l_party_name ;
                   IF name1 IS NOT NULL THEN
                      alert_button := Show_Alert('CUSTOMER_NAME');           
                         IF alert_button = ALERT_BUTTON1 THEN
                             go_item('HZ_PARTIES.PARTY_NAME')        ;
                            end if;
                      end if;
                   end if;       
              end;
         end if;
        end if; 

3. Enable zoom button for sales order form when user is in Main Tab.(In zoom_available procedure of custom.pll) begin 
  if (form_name = 'OEXOEORD' and block_name = 'ORDER') then
      return TRUE;
      else
      return FALSE;
      end if;
end zoom_available;
 
4. When user selects the customer field and click on the zoom button it should open the customer details block.
(we should define parameter as CUSTOMER_NAME  in the the form  same as the name given here in the code )
Elsif(event_name = 'ZOOM') then
          if ((form_name = 'OEXOEORD' and block_name = 'ORDER')) then             
              param_to_pass1 := name_in('ORDER.SOLD_TO');
               fnd_function.execute
                (FUNCTION_NAME=>'CUSTOMER_INFORMATION_FUNC',
                  OPEN_FLAG=>'Y',
                  SESSION_FLAG=>'Y',
                  OTHER_PARAMS=>'CUSTOMER_NAME="'||param_to_pass1||'"'
                 );
  end if;

5.Change the Lov of the Customer field of Sales order form to display the customers who are having the bill to and ship to address.Elsif (event_name = 'WHEN-NEW-FORM-INSTANCE' and form_name = 'AA_CUSTOMER_CREATION_TEMP')then
           r:=find_group('cust_name');
                     if not id_null(r) then
                                delete_group('cust_name');
                    end if;
                   message('lov1');
       r:=create_group_from_query(grp_name,'select party_name  from hz_parties where party_id>50000');
     errcode  := POPULATE_GROUP_WITH_QUERY( r,'select party_name  from hz_parties where party_id>50000');
      if(errcode<>0)
         then message('error');
         end if;
            message('lov4');
         set_lov_property('CUSTOMER_NAME',group_name,r);
             message('lov5');
    end if;
   end if;
  end event;

Thursday, October 27

Symantec SHS Additional Data Elements Form

  1. Symantec SHS Additional Data Elements Form : Form Personalization For License Form
Responsibility: Sym US OM Super User
Navigate: Licenses,Orders,Returns-> Licenses -> Help -> Diagnostics -> Custom Code -> Personalize
Oracle Password Window will appear. Type the Oracle Password provided.
STEP-1:
Type the following in seq and description fields.
Seq 10
Description Create Menu Item
Go to ‘Condition’ tab
Trigger Event WHEN-NEW-FORM-INSTANCE
Condition
Go to ‘Actions’ tab. Type the following,
Seq 10
Type Special
Description
Language All

In right side, type the following.
Menu Entry SPECIAL 13
Menu Label SHS Additional Data Elements Form
Click On ‘Apply Now’ Button And Save it.
STEP-2:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 20
Description Check For NULL
Go to ‘Condition’ tab
Trigger Event SPECIAL13
Condition :SYMOM_LICENSE_LINES_VW.ORDER_NUMBER IS NULL
Go to ‘Actions’ tab. Type the following,
Seq 10
Type Message
Description
Language All
In right side, type the following.
Message Type Show
Menu Label SHS Additional Data Elements Form
Message Text Order Number Cannot be NULL. Please query a value.
Click On ‘Apply Now’ Button And Save it.
STEP-3:

Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 30
Description Global Variables Initalization

Go to ‘Condition’ tab
Trigger Event SPECIAL13
Condition :SYMOM_LICENSE_LINES_VW.ORDER_NUMBER IS NOT NULL

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All
In right side, type the following.
Object Type Global Variable
Target Object v_order_number
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_order_header_id
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.
STEP-4:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 40
Description Open Additional Data Elements Form


Go to ‘Condition’ tab
Trigger Event SPECIAL13
Condition :SYMOM_LICENSE_LINES_VW.ORDER_NUMBER IS NOT NULL
Click On ‘Seq’ Left Side and type the following.
Seq 10
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_order_number
Property Name VALUE
Value =to_number(:SYMOM_LICENSE_LINES_VW.ORDER_NUMBER)

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_order_header_id
Property Name VALUE
Value =to_number(:SYMOM_LICENSE_LINES_VW.HEADER_ID)

Click On ‘Apply Now’ Button and Save it.


Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name VALUE
Value LICENSE_ORDER_FORM

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 30
Type Builtin
Description
Language All

In right side, type the following.
Builtin Type FND_FUNCTION.EXECUTE
Function Name SYMOM_SYMOMADDLDTL

Click on Save.




  1. Symantec SHS Additional Data Elements Form : Form Personalization For Service Contracts Form
Responsibility: SYM US Service Contracts Manager
Navigate: Launch Contracts-> Double click on any contract number(If Recent documents are not empty)
If Recent documents are empty then go to find->type any contract number and click on ‘Search’ button.
‘Service Contracts’ Form will be opened. Then go to Help -> Diagnostics -> Custom Code -> Personalize
Oracle Password Window will appear. Type the Oracle Password provided.

STEP-1:

Type the following in seq and description fields.
Seq 10
Description Create Menu Item

Go to ‘Condition’ tab
Trigger Event WHEN-NEW-FORM-INSTANCE
Condition

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Special
Description
Language All

In right side, type the following.
Menu Entry SPECIAL 14
Menu Label SHS Additional Data Elements Form


Click On ‘Apply Now’ Button And Save it.

STEP-2:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 20
Description Check For NULL

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition : OKS_LINES.CHR_ID IS NULL AND :OKS_LINES.ID IS NULL


Go to ‘Actions’ tab. Type the following,
Seq 10
Type Message
Description
Language All
In right side, type the following.
Message Type Show
Message Text Please Select a Contract Line.


Click On ‘Apply Now’ Button And Save it.
STEP-3:

Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq Description
30 Global Variables Initialization

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition : OKS_LINES.CHR_ID IS NOT NULL AND :OKS_LINES.ID IS NOT NULL

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_chr_id
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_cle_id
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name INITIAL VALUE
Value NULL

Click On ‘Apply Now’ Button and Save it.

STEP-4:

Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq Description
40 Check if not in table

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition : OKS_LINES.CHR_ID IS NOT NULL AND :OKS_LINES.ID IS NOT NULL AND 1 NOT IN( (SELECT 1 FROM symom_shs_add_data_element where contract_cle_id = to_number(:OKS_LINES.ID)))

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All

In right side, type the following.
Message Type Show
Message Text Additional Data Elements Form Cannot Open As No data available For This Line.

Click on ‘Apply Now’ and save it.

STEP-5:
Go to ‘Condition’ tab and click above on ‘Seq’, type the following.

Seq 50
Description Open Additional Data Elements Form

Go to ‘Condition’ tab
Trigger Event SPECIAL14
Condition :OKS_LINES.CHR_ID IS NOT NULL AND :OKS_LINES.ID IS NOT NULL AND 1 IN( (SELECT 1 FROM symom_shs_add_data_element where contract_cle_id = to_number(:OKS_LINES.ID)))

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_chr_id
Property Name VALUE
Value =to_number(:OKS_LINES.CHR_ID)

Click On ‘Apply Now’ Button and Save it.
Click On ‘Seq’ Left Side and type the following.
Seq 11
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_contract_cle_id
Property Name VALUE
Value =to_number(:OKS_LINES.ID)

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 12
Type Property
Description
Language All

In right side, type the following.
Object Type Global Variable
Target Object v_form_name
Property Name VALUE
Value SERVICE_CONTRACT_FORM

Click On ‘Apply Now’ Button and Save it.

Click On ‘Seq’ Left Side and type the following.
Seq 30
Type Builtin
Description
Language All

In right side, type the following.
Builtin Type FND_FUNCTION.EXECUTE
Function Name SYMOM_SYMOMADDLDTL

Click on Save.

  1. Symantec SHS Service Contract Form Personalization on Termination (Warning message)
Responsibility: SYM US SaaS Contracts Business Administrator
Navigate: Launch Contracts
Oracle Contracts Form will be opened.
Now Click on ‘Torch’ icon.
‘Search Templates And Contracts Form’ will be opened. Enter any Contract
Number in the ‘Contract Number’ Field like the following screenshot.


Click On ‘Search’ Button.

Right Click on Displayed Contract number.

Select ‘Terminate’ from the list.

‘Terminate Contracts’ Form will be opened.

Now navigate to Help > Diagnostics > Custom Code > Personalize

Oracle Password Window will appear. Type the Oracle Password provided.

Type the following in seq and description fields.
Seq 10
Description Check availability in table

Go to ‘Condition’ tab
Trigger Event WHEN-NEW-BLOCK-INSTANCE
Condition
:OKSTERMN_TS.CONTRACT_ID is not null
and :OKSTERMN_TS.TERM_DATE is not null
AND 1 IN( (SELECT 1 FROM symom_shs_add_data_element where contract_chr_id = to_number(:OKSTERMN_TS.CONTRACT_ID)))

Go to ‘Actions’ tab. Type the following,
Seq 10
Type Message
Description
Language All

In right side, type the following.
Message Type Warn
Message Text Warning : Contract is being Terminated without serving entire Notice Period


Save it.