how to clear subcategory when category changed in through API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:23 PM
Hi, I have 2 serviceNow instances integrated bidirection. When i am changing the category in first instance and leaving subcategory as empty, in second instance category is getting updated and subcategory is not changing to blank instead it is holding previous value. can anyone help me on this?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:56 PM
Hello @Hareesha ,
Please make sure you are sending the subcategory value as empty (subcategory='') in the request body.
If my answer solves your issue, please mark it as Accepted✔️ and Helpful 👍based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:57 PM
Hi @Hareesha
Could you please elaborate how this integration has been achieved ? I assume it is via REST API calls. If yes, please check what payload is being sent to the target instance from the source instance. I assume the payload is only taking changes and sending it across, that's why only changed fields are getting updated.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 01:15 AM
Hi @Amit Verma ,
Yes, i can see in payload that subcategory value is not sending empty. Its sending previous value. How can i fix this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 02:26 AM
You need to look into the code where the payload is being created. While constructing the payload, you need to see what all fields are being queried for change. If possible, can you share the code or the logic by which the payload is being created ?
Please mark this response as correct and helpful if it assisted you with your question.