Setting Duration Field value From Flow designer variable to Scripted rest API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello Everyone,
I am trying to create a SLA from UAT to Dev, if record producer submitted means automatically SLA will get created. As of now Sla getting created but Duration field and Schedule field is not getting updated. I have provided now using flow designer script in UAT and scripted rest Api in Dev to receiving data.
Set FLow Variable:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
If the SLA Duration and Schedule fields are not populated, you need to go back to the source and first log the values the script is receiving for u_schedule and u_schedule_duration. On the contract_sla table, the schedule field is a reference to the Schedule table, so you need to provide the sys_id of a valid record on this table. The duration field is, unsurprisingly, the type of Duration. If the variable is also this type, you may need to use server methods like dateNumericValue() and setDateNumericValue() instead of converting it to a string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
but why are you creating SLA via script?
those are meant to be configured manually by admins in DEV and then can be migrated via update set to higher instance
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader