Friday, August 26, 2016

Attachment to Workflow Notification

Add multiple Attachments to Workflow Notification:


1. Create Attribute like below:


2. Add Message Attribute like below (to to respective Notification Messages)
                             
                              Internal name : #ATTACHMENTS
                              Display Name: #ATTACHMENTS
                                Value:    Custom Attachment Attribute (which created above)


3. In the Workflow Package Set the Attribute Value Like Below:
               
 
        SELECT count(*) into l_attach_cnt
      FROM  FND_ATTACHED_DOCS_FORM_VL
      WHERE  function_name  =DECODE(0,1,NULL,'GLXJEENT')
      AND function_Type=DECODE(0,1,NULL,'O')
      AND  (    (      entity_name = 'GL_JE_HEADERS'    AND pk1_value = l_je_batch_id )  )    ;
   
           

     if l_attach_cnt >0  then

        wf_engine.SetItemAttrText( itemtype => itemtype,
                                     itemkey  => itemkey,
                                     aname    => 'ATTACH_ATTRIBUTE',
                                     avalue   => 'FND:entity=GL_JE_HEADERS&'||'pk1name=je_batch_id&'||'pk1value='||l_je_batch_id );
     end if ;


4. After that check the notification to find all the attachments, all the attachments count is equal to l_attach_cnt variable. 

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. hi can you tell me how attache attachment using procedute. because i am doing same but it is not working, it istaking only last attachment not all attachments.

    ReplyDelete