
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 02:09 PM
Hi Experts,
I have created a button which calls the Form Widget in Service Portal. I am able to pass the table name, sys_id as -1 and view to open a new record.
Now I also I want to pre-populate field fields when i click on the button. How can I pass the other field values to form widget?
If form widget is not an option, what should be done?
Please mark this response as correct or helpful if it assisted you with your question.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 02:32 PM
I don't think the form widget accepts query parameters for populating fields like the oob form view does. You might try a client script on the form that checks to see if you're in service portal, then grabs the url parameters and sets the fields.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 02:32 PM
I don't think the form widget accepts query parameters for populating fields like the oob form view does. You might try a client script on the form that checks to see if you're in service portal, then grabs the url parameters and sets the fields.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 02:43 PM
Thats my last option.
There is a line in form widget
result = $sp.saveRecord(input.table, input.sys_id, input._fields);
Do you know, what does input._fields signifies? I couldn't find any definition for $sp.saveRecord
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 07:54 PM
I ended up using a client script. Thanks Brad
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2018 11:29 AM
You will have to clone OOB form widget. If you are opening cloned form widget on a spModal you can pass the form fields and values in the 'shared' parameter of spModal.open() as documented here. The 'shared' JSON object is accessible in the embedded cloned form widget's client script