- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a requirement to show the form section 'self serve' tab to show only when opened through a specific record producer.called 'Mac Systems' i have created a form section on dmn_demand table .Please help me in achieving this requirement
Help me to hide this section in the form when it is opened through a specific record producer.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
did you add log and see what came in that scratchpad variable?
is the section name correct? underscore etc
how are you testing?
1) you should test 1 Demand submitted by record producer Mac Systems
2) another submission of Demand by some other record producer
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can use this logic
1) display business rule on your table (dmn_demand)
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var gr = new GlideRecord("sc_item_produced_record");
gr.addQuery("producer.name", "Mac Systems");
gr.addQuery("task", current.sys_id);
gr.query();
g_scratchpad.isValid = gr.hasNext().toString();
})(current, previous);
Then
2) onLoad client script on your table (dmn_demand)
function onLoad() {
// give correct section name
if (g_scratchpad.isValid == 'true')
g_form.setSectionDisply('self_serve_variables', true);
else
g_form.setSectionDisply('self_serve_variables', false);
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Even i have tried the same scenario is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Ankur Bawiskar it is not working even if i open other record producers still i can able to see it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
did you add log and see what came in that scratchpad variable?
is the section name correct? underscore etc
how are you testing?
1) you should test 1 Demand submitted by record producer Mac Systems
2) another submission of Demand by some other record producer
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader