Use Rest API to create record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 10:15 PM
Hi All,
I want to create a record in another instance using rest message.
and I created a flow action to post the information when conditions are met.
I can create the record through this action, but the datetime field can not be updated.
Could you please help to find the problem?
Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 10:37 PM
is that date/time or date type of field?
Are you sure you are passing the correct values?
are you sure the input value is correct?
share the logs by adding gs.info(inputs.startTime) and gs.info(inputs.endTime)
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 12:35 AM
Yes it is date time field.
I change the code like below, and it works in my pdi .but it doesn't work in my customer7s instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2025 03:48 AM
any script is clearing the fields?
what error do you get?
share the logs by adding gs.info(inputs.startTime) and gs.info(inputs.endTime)
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 10:42 PM
Hi @ShuangChang , in which format are you passing the datetime field in the flow designer?
Are you passing in this format -
2025-04-11 05:37:19
If not, it will not get updated. Please log the values and see.