UI Builder Create Record

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 02:03 AM
Hi Everyone,
I'm using ui builder create record operation.
In my client script i have these:
api.data.create_record_1.execute({
'table': 'kb_social_qa_question',
'templateFields': templateFields,
'useSetDisplayValue' : false
});
Somehow if i have text inside a quotation " it will not properly read the templatefields.
can we specify in the parameters the field name directly instead?
Thanks,
Tads
- Labels:
-
Now Experience UI Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 01:18 PM
There were field types I never figured out in the encoded query. It is not an elegant way to try to create or update data, to say the least. But I did document what I learned about escaping and what needed to be escaped. Perhaps it may be helpful to you. UI Builder Encoded Query for Update Record - Developer Community - Question - ServiceNow Community

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2022 04:27 AM
Hi Velma, I will check this out! 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 03:18 PM
I would add to this that while that Create Record data resource is available to use, it may not work for all use cases and the encoded query parameter can be limiting. You could create your own GraphQL, REST, or Transform data resources that mutate data as well.
I've got an article showing how to create a data resource and we're working on additional content around data resources at the moment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2022 05:33 AM
Hi,
You can check out if there was any error while executing your data source. You can use below code in your script to check the output of our data source. Call this script from all three events of your data source to see the output.
console.log("OUTPUT" + JSON.stringify(event.payload));
Alternatively, you can create your own data source. Check out my article here how you can create it.
ServiceNow Community Rising Star 2022/2023