How to customise a Request Offering form
I am looking for some help from the community with regards to customising a Request Offering to lock down and hide the 'Create Request on Behalf of' input. Our portal is setup for all Request Offerings for Analysts and End Users to be able to create Incidents and Service Requests on behalf of others but we have a specific Request Offering that we want to make exclusive for the user raising the request.
I have checked through the Knowledge Base which details the customisation of the forms but not for Request Offerings so am hoping that the community can assist with what we will need to do to accomplish the locking down/hiding of the 'Create Request on Behalf of' option for a specific Request Offering.
Best Answer
-
Konstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭
In your custom.js, you can create a function which runs when the page is (almost) ready, then check if you are on your desired RO by looking in at the URL, and then hide the div containing the control, for example like this:
$(document).ready(function (){ // Only worry about this RO if (document.URL.indexOf("ServiceCatalog/RequestOffering/3455521c-5bf9-c9a6-ceb8-832867023f58,d28d43f9-a9bc-287d-3737-2f1c9e800342") > -1) { // Hide the element $(".ro-request-on-behalf").hide(); } });
2
Answers
In your custom.js, you can create a function which runs when the page is (almost) ready, then check if you are on your desired RO by looking in at the URL, and then hide the div containing the control, for example like this:
@Konstantin_Slavin-Bo many thanks for coming back!