How to check for workspace view in Business Rule ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2019 12:50 AM
Hi,
I have a use case where I am displaying the 'kb_quality_checklist' list in Agent Workspace. There is a business rule 'Display error message' that runs on display of the 'kb_quality_checklist' form. In the condition of this business rule, there is a check using 'RP.getViewID()'. However, RP is not defined in agent workspace. So this throws up a runtime error whenever I open the form. I have tried checking whether RP is defined in the condition by using 'typeof RP != 'undefined', however this change throws up an evaluator error whenever the form is opened in platform.
So my question is that is there any way to check whether the business rule that triggers on display is running on standard platform view or in the workspace view ?
Thanks.
Yogesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2019 07:11 AM
Hi Yogesh
The way I have achieved this is to wrap it in a try catch
var isWorkspace = false;
try {
isWorkspace = (typeof RP === 'undefined');
}
catch (err) {
isWorkspace = false;
}
In this way you can check and evaluate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2021 05:33 AM
This did not work. Any suggestions would be really helpful!
Regards,
Arpitha G