- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 07:21 AM - edited 07-13-2023 09:37 PM
Hi,
When I try to attach file in incident, file should get attached in other incident.
So on first instance, written a business rule to trigger outbound Attachment API - Post method. With below script.
outbound API URL: https://dev**.service-now.com/api/now/attachment/upload
Script:
var file = 'https://dev****.service-now.com/api/now/attachment/'+current.sys_id;
Could you please help to resolve this issue. Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 03:26 AM
based on your comment on other thread.
Response:{"error":{"message":"User not authorized","detail":"User is unauthorized to write to record: incident.a83820b58f723300e7e16c7827bdeed2"},"status":"failure"}
This is happening because the user you are using for attachment transfer does not have sufficient roles to write incident record. Try user with admin role for testing .
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 03:26 AM
based on your comment on other thread.
Response:{"error":{"message":"User not authorized","detail":"User is unauthorized to write to record: incident.a83820b58f723300e7e16c7827bdeed2"},"status":"failure"}
This is happening because the user you are using for attachment transfer does not have sufficient roles to write incident record. Try user with admin role for testing .
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 03:52 AM
@manju12 , @sushantmalsure , Thanks a lot, it worked.