- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 04:52 AM
Dear reader,
The global openFrameAPI contains a method called openServiceNowForm(). The example code below opens a new incident without prefilled data:
openFrameAPI.openServiceNowForm({ entity: 'incident' query:'active=true' });
I would like to know if it is possible to modify the query part of the code above so that you can set input fields automatically. For example, values like: Caller, Location and Category are by default empty. The situation I want to accomplish looks like this: Caller=test-caller, Location=New York. Is this possible? Could you give an example?
Thanks in advance.
Kind regards,
Mike Kruithof
Link to the documentation:
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 10:33 AM
you can use below blog to populate fields while using API
https://community.servicenow.com/community?id=community_blog&sys_id=596dea29dbd0dbc01dcaf3231f96190b
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 10:33 AM
you can use below blog to populate fields while using API
https://community.servicenow.com/community?id=community_blog&sys_id=596dea29dbd0dbc01dcaf3231f96190b
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2019 11:41 PM
Thanks Sachin for your help. The link which you referred to answered my question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 05:37 AM
Hi is there any way filling multiple values of form using openServiceNowForm() in query, the answers mention doing it using a URL, is there and example ?