SMConfiguration Functionality
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 08:23 AM
Hi all,
We're using the customer service plugin, and have a custom script on the task table that rolls work notes up to a parent record, if one exists. However, this is happening twice on some occasions in case management. I believe this is due to the OOTB script 'ValidateChanges', which contains a function that does this already on the 'sm_task' table - so it's happening on work orders, which are extended from this. There is a condition to this part of the script -
if (ss.fieldChangeCheck("work_notes") && (new sn_sm.SMConfiguration()).isEnabled(current, "rollup_work_notes", false)) {
RollUpWorkNotes(current);
}
The issue is that 'sn_sm.SMConfiguration' is a hidden function that we can't see the code for, and we cannot tell when this condition is being satisfied.
Any advice or documentation you can provide on the workings of this would be greatly appreciated.
Thanks in advance,
Toby
- 4,682 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 01:54 AM
isEnabled function gets the configuration GlideRecord object for an application. As parameter it takes a GlideRecord of sm_config, sm_order or sm_task (or extending tables) and returns a GlideRecord object of sm_config or null.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2017 01:19 AM
Hi Toby,
I'm not sure if this is still an issue, but I'll try to help anyway. The sn_sm.SMConfiguration()).isEnabled() function is checking the configuration settings of the various possible SM Applications - in your case it's checking the "rollup_work_notes" true/false flag.
You can check what the settings are by navigating to 'sm_config.list' and looking at the "Rollup work notes" field for each application. Given that you have a custom script that is already performing what this setting does, you may want to set any "Rollup work notes" that are true to false.
I hope this helps.
Regards,
Dean,