Creating Hardware Request From Incident - Pass Caller to Portal Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have created a CREATE HARDWARE REQUEST action from an incident. This correctly opens a new window to the correct form, but I am having trouble passing the caller as sysparm to the portal form 'requested_for' variable as we are setting the default value on 'requested_for' as part of a variable set (used in 40+ forms).
javascript:gs.getUserID()
I want to use the passed sysparm user/caller if its there, or used the default value if its not there... and I am running into trouble.
I think the URL is passing the sysparm out correctly as I can see it and its the caller from the incident, but it ALWAYS is using the default value for 'requested_for' even if I try to set it in onLoad script. What should this situation look like?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @jlaps ,
I think the issue might be because of the gs.getUserID() is a server side command which executes even before you're trying to set values into the Requested For variable.
Maybe you need to do it the hard way to fulfill your requirement by creating an onLoad client script, calling Script include from it & then getting the value of requested for & populating it over there.
Please let me know if you need any more information on this query? I can help you with that.
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards,
Madhan