Friday, 30 July 2021

How to get the UserKey Values for the Attachment Upload

 Scope:

The scope of this document is to tell you how to identify the user key values when uploading the attachment to Fusion SaaS using the web services

Requirement:

Here the requirement is to upload the attachment to Fusion SaaS and we need to identify the UserKey Values in the payload for this.

How To:

We use the below URL for uploading the attachment.

https://<hostname>.<domainname>/publicFinancialCommonErpIntegration/ ErpObjectAttachmentService?WSDL

Below is the request payload

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/" xmlns:erp="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">

   <soapenv:Header/>

   <soapenv:Body>

      <typ:uploadAttachment>

         <typ:entityName>?</typ:entityName>

         <typ:categoryName>?</typ:categoryName>

         <typ:allowDuplicate>?</typ:allowDuplicate>

         <!--Zero or more repetitions:-->

         <typ:attachmentRows>

            <!--Optional:-->

            <erp:UserKeyA>?</erp:UserKeyA>

            <!--Optional:-->

            <erp:UserKeyB>?</erp:UserKeyB>

            <!--Optional:-->

            <erp:UserKeyC>?</erp:UserKeyC>

            <!--Optional:-->

            <erp:UserKeyD>?</erp:UserKeyD>

            <!--Optional:-->

            <erp:UserKeyE>?</erp:UserKeyE>

            <!--Optional:-->

            <erp:AttachmentType>?</erp:AttachmentType>

            <!--Optional:-->

            <erp:Title>?</erp:Title>

            <!--Optional:-->

            <erp:Content>?</erp:Content>

         </typ:attachmentRows>

      </typ:uploadAttachment>

   </soapenv:Body>

</soapenv:Envelope>


In the above 

Entity Name of the attachment

Navigate to “Setup & Maintenance UI > Set up Tasks > Manage Attachment Entities or Manage Attachment Categories” to get valid entity names. For example, AP_INVOICES_ALL, AR_BATCHES_ALL, PO_CONFIG_COMPONENTS, etc. are possible entity names.


Category Name of the attachment

Navigate to “Setup & Maintenance UI > Set up Tasks > Manage Attachment Entities or Manage Attachment Categories” to get valid category names. For example, AP_SUPPORTING_DOC, PAYMENT_SUPPORTING_DOC, SCANNED_INVOICE_IMAGE, etc. are possible category names.


Option to allow duplicate attachments

Values: Yes or No

And for UserKeys, we use the below 

select * from FUN_ERP_ATTACHMENT_CONTEXTS where ERP_FAMILY_CODE='FIN'

For Entity AP_INVOICES_ALL, we get the below SQL statement


"SELECT API.INVOICE_ID FROM AP_INVOICES_ALL API, FUN_ALL_BUSINESS_UNITS_V BU, POZ_SUPPLIERS PZ WHERE API.ORG_ID = BU.BU_ID AND BU.BU_NAME = :1 AND API. INVOICE_NUM=:2 AND API.VENDOR_ID=PZ.VENDOR_ID AND PZ.SEGMENT1=:3"


The below bind parameter define the user key elements and other user key elements passed as #NULL

No comments:

Post a Comment