Troubleshoot Attachments

This document covers some troubleshooting examples for attachments.

Issue: 400 Bad Request Error

Issue: REST API 400 Bad request error:

Post: PODURL/crmRestApi/resources/11.13.18.05/customerWorkOrders/0000022013/child/Attachment

Response: 400 Bad Request]]></nstrgmpr:errorPath><nstrgmpr:instance><![CDATA[Permission to insert or update documents is denied due to data security rules. Permission to insert or update this attachment is denied due to the data security rules

Resolution:

The Work Order object is set up to use attachment category security. It’s not required to have different security for the Photo category than for the Attachment category. Remove the data security for Photo Category by following these steps:

  1. Navigate to Setup and Maintenance.
  2. Search for Task Manage Attachment Entities.
  3. Search for Entitiy Name = SVC_WORK_ORDERS
    • User Entity Name: SVC_WORK_ORDERS
    • Module: Service
    • Database Resource: SVC_WORK_ORDERS
    • Table Name: WorkIOrderVO
  4. Deselect the check box for Enable Security.

Issue: Count '0' Response from Postman

Issue: OIC integration is showing the attachment was created, but when checked from postman, it's getting a response with a count of '0'.

Resolution:

  1. Ensure the association between the category and the attachment entity work order is set correctly.

    Refer to the Attachments Troubleshooting topic in the Implementing Applications guide.

    • In the Roles page, check for the user in the Manage Application Attachment Category.
    • Ensure the SERVICE_APP_ICS_ID (Integration User) has the Sales Administrator role.
  2. Define new Attachment Category and associate it to the entity.

    Refer to the Manage Attachment Categories topic in the Oracle Fusion Service Configuration chapter of this guide.

  3. Navigate to Security Console.
  4. Create a new custom role using the following parameters.
    • Role Name: Enter a name.
    • Role Code: ATTACHMENTS_ROLE
    • Role Category: Common - Job Roles
  5. Navigate to Role Hierarchy.
  6. Add the Service Work Order Administration role.
  7. Click Save and Close.
  8. Add the Role to the Integration User.
  9. Create another Job Role with the following parameters:
    • Role Name: Enter a name.
    • Role Code: ATTACHMENTS_ROLE
    • Role Category: Common - Job Roles
  10. Navigate to Role Hierarchy.
  11. Add the following privileges:
    • Attachments User
    • Attachment Read
    • Attachments Update
    • Attachments Delete
  12. On the Users tab, add the needed user that makes the call (Integration User).
  13. Click Save and Close.
  14. From the Navigator, go to Tools > Scheduled Processes and run the following jobs:
    1. Retrieve Latest LDAP Changes
    2. Send Pending LDAP Requests
    3. Import User and Role Application Security Data
    4. Synchronize User GUID