Change Templates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2015 05:58 AM
Hello all,
We have a requirement to limit users to only raising standard changes via a pre-approved template.
I've created a record producer to submit a request for a standard change, and set up a workflow from a custom table to then create a template once the request has been approved. I've also created a client script on the change table to alert the user if they try and select a standard change wiithout using a template.
All good so far.
Couple of roadblocks:
- Is there any way to restrict the visibility of the 'Templates' context menu based on table and condition?
We'd only like people to apply a template for a standard change if the change has not been submitted for approval. Otherwise I can forsee people (accidentally or intentionally) apply a standard change template to a change going through the approval process.
- Has anyone ever created a UI button to apply templates, rather than a context menu?
I find the context menu to be a little bit too subtle for users, a button would work better from a visibility point of view.
Any suggestions would be much appreciated!
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2015 07:05 AM
Hi Ranjiv,
There are a couple ways you can apply templates in script. I've personally done it using a display business rule so its just seamless to the end user. But the syntax would be the same for a non-client UI action. Here's an example of the syntax for that: current.applyTemplate('my_template_name');
For the visibility of the Templates context menu, it looks like its an OOB UI Macro, per this thread. the template context menu
Modify at your own risk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2015 07:29 AM
Hi Ranjiv,
I recently done something very similar:
To restrict the visibility I used the "User" and "Group" fields on the template field. When submitted for approval it would only have the "Change Admin" group assigned. When approved it would have the "Change Submitters" (or whoever can utilize that template.
There are 100's of templates I worked with and they needed to be put into categories, so I decided to utilize Interceptors to apply the templates. Users find a normal closed change that was successful and then request that a template be produced from that record through a UI action. This UI action creates the template through a glide record insert and creates a task to go to a Change Admin group to approve.
On the template form I added a Status field that controls whether or not the template is published. (This field is of course hidden when not needed via a View Rule) When the Change Admin decides to publish I have an onBefore Business rule create an interceptor record.in the category of choice based on a drop down on the template form.
Hope this helps.
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2015 08:46 AM
Thanks both, thats very helpful.
Bethany - I'm wary of amending that o-t-b macro, so will go down the route of educating users on the hidden joys of the right click.
Brad - thats a nice way of doing it, I've never worked with interceptors, but your method sounds cleaner than mine.
I've gone down the route of a record producer to a custom 'routine change request' table, and then on approval, a gliderecord insert to the sys_template. And as they want a 1 year limit to standard templates, a scheduled daily job on the template table to deactivate the template if > 1 year, and then notify all parties.
Another issue I've just stumbled upon is that templates dont seem to apply on read only or hidden fields! I have a custom reference field on the change table to populate the template being used when applied - this doesnt populate unless I expose the field fully. Arrrgh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2015 10:12 AM
My process involves quite a few scripted fields. Some of these are to bypass the read only / hidden fields.