Where can I find documentation about GlideappScriptHelper API and copyItem especially
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2015 04:35 AM
I'm having an issue with "Copy" button in Catalog Item form (sc_cat_item table). When this button is hit, I'm getting a copy of the catalog item, but it also copies all the Incidents, which use this catalog item. When I tried to customize its behavior, I got to this script only:
Copy UI Action script:
var helper = new GlideappScriptHelper();
helper.copyItem(current);
Now this is very little help, given lack of remarks or any hints..
I've checked the wiki and found no documentation about the GlideappScriptHelper api.
Please give me some info how can I customize / parametrize this function, so it does not copy all the tasks, using this sc_cat_item row.
Best regards,
Todor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2015 05:01 AM
Hi Todor,
I don't see any documentation available as well, unfortunately.
GlideappScriptHelper is a scriptable java class. As far as I can see the 'copyItem' function takes only one parameter, which should be an sc_cat_item object. When that's the case (sc_cat_item object), it does the following:
1. Copies all fields with the same name from current record to the target.
2. Updates Translation Entry
3. Copies Variables
4. Copies Client Script and Policy
5. Copies all other Relationships (Available to, Not Available to, Approved by User/Group)
6. Copies all attachments
Hope this helps.
Regards,
Sergiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2016 04:06 AM
Hi Sergiu,
Thanks for that information please clarify more on the questions from your reply
1. Copies all fields with the same name from current record to the target. - Before creating can we have a "Wait for Stage" where the details can be updated. For eg: Requested for , Attachments etc.
6. Copies all attachments - Can we add new attachments