Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Dot-walking from Catalog Task to RITM field in Client Script

rebecca75
Tera Contributor

I'd like to hide a tab on the catalog task, onload, if the u_request_area is not 'Access Request', which is on the RITM level.

I'm trying to dot-walk from sc_task to RITM and it's not working. There's no errors being thrown. Another question, on the RITM there is a UI Policy to hide the u_request_area if the RITM is not a Access Request. I assume I can still dot-walk to he RITM level, correct?

Ideas?

function onLoad() {

//Hide Orchestration tab if not Access Request

        var req = g_form.getReference(request_item);

        if (req.u_request_area != 'Access Request') {

                g_form.setSectionDisplay('orchestration', false);

        }

}

1 ACCEPTED SOLUTION

oharel
Kilo Sage

Hi Rebecca,



Try:


function onLoad() {


//Hide Orchestration tab if not Access Request


        var req = g_form.getReference('request_item');   <-- this is what I changed


        if (req.u_request_area != 'Access Request') {


                g_form.setSectionDisplay('orchestration', false);


        }


}



harel



edit:


Sorry, my bad.


I think you are missing the quotes:


var req = g_form.getReference('request_item');


Other than that it should work.


View solution in original post

2 REPLIES 2

oharel
Kilo Sage

Hi Rebecca,



Try:


function onLoad() {


//Hide Orchestration tab if not Access Request


        var req = g_form.getReference('request_item');   <-- this is what I changed


        if (req.u_request_area != 'Access Request') {


                g_form.setSectionDisplay('orchestration', false);


        }


}



harel



edit:


Sorry, my bad.


I think you are missing the quotes:


var req = g_form.getReference('request_item');


Other than that it should work.


rebecca75
Tera Contributor

Ugh, sometimes you can look at something over and over and still not see it - thanks! It works now!