1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Open Sales Order Form by Workflow Notification through Form Personalization

Discussion in 'Oracle Apps Technical' started by Julian, Aug 13, 2008.

  1. Julian

    Julian Forum Advisor

    Messages:
    48
    Likes Received:
    1
    Trophy Points:
    90
    Open Sales Order Form by Workflow Notification

    For doing this you have to follow the following steps:

    Step 1: Open Sales Order Form from Oracle Application, and after that go to:

    Help -> Diagnostics -> Custom Code -> Personalize

    Step 2: Create an entry like the below:

    i) Step for define customization of form and setting up Trigger Event, Trigger Object and condition is shown in the image below.

    [​IMG]

    ii) Step for defining Actions: SEQ, Type, Description, Object Type, Target Object, Property Name and Value

    [​IMG]

    iii) Step for defining Actions: SEQ, Type, Description, Object Type, Target Object, Property Name and Value

    [​IMG]

    Step 3: Open Package OE_ORDER_WF_UTIL, find the procedure called SET_NOTIFICATION_APPROVER.

    OE_ORDER_WF_UTIL (Package) -> SET_NOTIFICATION_APPROVER (Procedure)

    Step 4: Define one local variable
    Code (Text):

    l_open_form VARCHAR2 (500);
     
    Step 5: Find

    Code (Text):

    WF_ENGINE.SETITEMATTRTEXT (itemtype, itemkey, 'NOTIFICATION_APPROVER', v_value);
    resultout := 'COMPLETE:COMPLETE';
    END IF;
     
    After that add the below customization:

    Code (Text):

    -- Start Customization
    l_open_form:='ONT_OEXOEORD:HEADER_ID='||TO_NUMBER (ITEMKEY);
    wf_engine.SetItemAttrText(
    itemtype => itemtype,
    itemkey => itemkey,
    aname => 'OPEN_FORM_COMMAND',
    avalue => l_open_form );
    -- End Customization
     
    Step 6: Open Package OE_ORDER_BOOK_UTIL, find the procedure called COMPLETE_BOOK_ELIGIBLE.

    OE_ORDER_BOOK_UTIL (Package) -> COMPLETE_BOOK_ELIGIBLE (Procedure)

    Find:

    Code (Text):

    OE_MSG_PUB.set_msg_context(
    p_entity_code => 'HEADER'
    ,p_entity_id => p_header_id
    ,p_header_id => p_header_id
    ,p_line_id => null
    ,p_order_source_id => l_order_source_id
    ,p_orig_sys_document_ref => l_orig_sys_document_ref
    ,p_orig_sys_document_line_ref => null
    ,p_change_sequence => l_change_sequence
    ,p_source_document_type_id => l_source_document_type_id
    ,p_source_document_id => l_source_document_id
    ,p_source_document_line_id => null );
    -- if order has been booked, inform the user
     
    After that add the following:

    Code (Text):

    -- Start Customization
    l_booked_flag := 'Y';
    --End Customization
     
    Step 7: In WorkFlow you have to change the following:
    1. Add Attribute “Open Form Command”
    2. After that go to message “Approve Return Order” add New Attribute “OPEN_FORM_COMMAND”:
    3. After this go to “Approve Return Order”s property and then customize the message body
    And that's all, you are done!
     
  2. Nice keep it up and share the more information