Not able to change record state to closed complete by REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2020 02:35 AM
Hi all,
I'm working on the Marketing Request (sn_sm_marketing_request) table through REST API. Marketing request concept works like Work order. In order to change state to "Close Complete", I tried to close it using UI, work notes need to be key in and click "Close Complete" button then the record can be closed. But the state cannot be changed by using REST API, based on the payload, the state stays work in progress and the work notes are empty. Please note that the related task of this request is close completed as well.
The marketing request is controlled by State Flow same as a Work order. Does anyone get passed of this before? Any assistance is much appreciated.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2020 04:39 AM
Hi wc99,
I faced this issue with change request state and was tried with state value then it worked fine.
1. Is this OOB API you are testing
If yes, then in the state value in which you are passing the 3 can you try passing the display value instead of backend value. As this API is designed to get data from different system so they have configured it like the way to use the display.
Can you try putting
state Closed Complete in the request body where you are setting 3.
or try with the display value of state which is closed complete.
If not works then try with the Close or Closed.
By this workaround I was able to set the state through API.
Mark helpful and correct if it helps.
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2020 07:52 AM
Hi CB,
Thanks for your suggestion, unfortunately it is not working.
Yes this is OOB API, I tested in REST API Explorer.
There is one Business Rule checking this state change if no work notes is provided.
I tried used background script and able to close it with and without deactivate the BR. Anyone one of you know how we can run a background script via REST API?