- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 05:47 AM
In some UI Actions the action name is called sysverb_insert
e.g Demand Management->Ideas Table->UI Action: Accept
This example creates a demand request record and redirects to the Idea Record (as defined in the script part of the UI action)
What is de code behind the sysverb_insert action name?
How can I influence it? If I want to transfer additional information to the demand Record.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 11:36 AM
There's actually a business rule on the idea table that creates the demand:
Create Demand on Accepting Idea
var demandTable = "dmn_demand";
if(GlidePluginManager.isActive('com.snc.project_management_v3')){
demandTable = SNC.PPMConfig.getDemandTable(current.getTableName());
}
var demand = new GlideRecord(demandTable);
demand.setValue("business_case", current.business_case);
demand.setValue("short_description", current.short_description);
demand.setValue("category","strategic");
demand.setValue("type", "project");
demand.setValue("submitter", current.submitter);
demand.setValue("parent", current.sys_id);
demand.setValue("idea", current.sys_id);
var dmnId = demand.insert();
demand.get(dmnId);
current.demand = dmnId;
current.stage = 'demand';
var link = ' <a href ="/' + demandTable + '.do?sysparm_query=number%3D' + demand.getValue('number') + '">'+ demand.getValue('number') +'</a>';
var message = gs.getMessage("Demand {0} has been created");
message = message.replace("{0}", link);
gs.addInfoMessage(message);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 07:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2016 12:00 AM
Thanks, David, good information, however not explaining what's behind sysverb_insert

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2016 03:53 AM
It doesn't? So the second screen shot (UI Action - Submit) doesn't show the code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2016 12:49 PM
Looking at other UI Action(s), "sysverb_insert" is also used, however with a different script
Table: Ideas , UI Action: "Accept"
current.state = '2';
current.update();
if (action.get('isFormPage') == 'true')
action.setRedirectURL(current);
else
action.setRedirectURL('/'+current.getTableName()+'_list.do');
This UI action creates a New Demand record and links that to the Idea record. The above script code does not reflect that.