Adding Multiple Attachments Dynamically
Step 1 :
Create a Item attribute of type Document.
Step 2 :
Create a message attribute in your message where you want the attachment to appear. Give the internal
name of the attribute as “#ATTACHMENTS”.
Step 3 :
Now you can either give the value to the item attribute created in step 1 dynamically in query or can
hardcore it by inputting the value :
FND:entity=XX_PNK_FORUM_ATTACHMENT&pk1name=FORUM_ID&pk1value=1014
Where :
• XX_PNK_FORUM_ATTACHMENT is the entity name
• pk1name is the Primary Key 1 column Name obtained from table
FND_DOCUMENT_ENTITIES=> pk1_column
Use the Query :
SELECT FDE.DATA_OBJECT_CODE,
fde.pk1_column,
fad.pk1_value
FROM FND_ATTACHED_DOCUMENTS FAD,
FND_DOCUMENT_ENTITIES FDE
WHERE fad.entity_name = FDE.DATA_OBJECT_CODE
Code in Query:
Wf_Engine.setitemattrdocument
( l_itemtype
, l_itemkey
, 'ATTACHMENT_LINK'
, 'FND:entity=XX_PNK_FORUM_ATTACHMENT&pk1name=FORUM_ID&pk1value='||
l_primary_key
);
With this you can get multiple attachments in your notification.
Step 1 :
Create a Item attribute of type Document.
Step 2 :
Create a message attribute in your message where you want the attachment to appear. Give the internal
name of the attribute as “#ATTACHMENTS”.
Step 3 :
Now you can either give the value to the item attribute created in step 1 dynamically in query or can
hardcore it by inputting the value :
FND:entity=XX_PNK_FORUM_ATTACHMENT&pk1name=FORUM_ID&pk1value=1014
Where :
• XX_PNK_FORUM_ATTACHMENT is the entity name
• pk1name is the Primary Key 1 column Name obtained from table
FND_DOCUMENT_ENTITIES=> pk1_column
Use the Query :
SELECT FDE.DATA_OBJECT_CODE,
fde.pk1_column,
fad.pk1_value
FROM FND_ATTACHED_DOCUMENTS FAD,
FND_DOCUMENT_ENTITIES FDE
WHERE fad.entity_name = FDE.DATA_OBJECT_CODE
Code in Query:
Wf_Engine.setitemattrdocument
( l_itemtype
, l_itemkey
, 'ATTACHMENT_LINK'
, 'FND:entity=XX_PNK_FORUM_ATTACHMENT&pk1name=FORUM_ID&pk1value='||
l_primary_key
);
With this you can get multiple attachments in your notification.



This comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteGood explanation. I understood the concept and implemented it.But how to handle such cases where I have multiple pk1-value in a single notification.
Appreciate your help in this.