I have a requirement to show the form section 'self serve' tab to show only when opened

Trupti Krishnam
Tera Contributor

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

 

TruptiKrishnam_0-1755752975820.png

Help me to hide this section in the form when it is opened through a specific record producer.

1 ACCEPTED SOLUTION

@Trupti Krishnam 

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

function onLoad() {

    // give correct section name
    alert('value->' + g_scratchpad.isValid);
    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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

@Trupti Krishnam 

any update to this?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  I 'm able to see the tab when i raise a request from the MAC item

But i m also able to see the tab when in raise a request from other record producer .., but after refreshing it for twice /thrice it is disappearing 

@Ankur Bawiskar  any solution on this please?