How to enable the "Create Request On Behalf Of" field to end users for selected Request Offerings
Is there a way to enable the "Create Request On Behalf Of" field to end users for selected Request Offerings only? Currently, the field is visible to SM Admins. I know also that we can set this in the 'Settings Item' to allow end users to view this field, however that will be shown to all Request Offerings. I want to limit end users to see this "Create Request On Behalf Of" field to maybe 1 or 2 request offerings. is this possible?
I added this script to the custom.js file, but it doesn't seem to work:
<div>var url = window.location.href;</div><div><br></div><div>function getLastPart(url) {</div><div> var parts = url.split("/");</div><div> return (url.lastIndexOf('/') !== url.length - 1 ? parts[parts.length - 1] : parts[parts.length - 2]);</div><div>}</div><div>//Request Offering - User Onboarding</div><div>if (getLastPart(url) === "a4baca28-a336-4259-0430-360f394eb43f,8ae08b6f-d9d4-680e-2182-552b894888f2" || (getLastPart(url) === "2d24b825-d622-7387-ef4e-dd0f8a8314e6,41b253c7-a9fa-959e-5ee6-8eab191dee2f")) {</div><div> // Show your overlay</div><div> //alert("User Onboarding");</div><div><br></div><div>$(document).ready(function() {</div><div> // jQuery code goes here</div><div>$('body').append('<style> div.panel.ro-request-on-behalf { display: block;}</style>');</div><div><br></div><div>});</div><div>}</div>
Am I doing it right, or there are something else that I'm missing?
Looking forward to hearing from you guys. Thanks in advance!
Best Answer
-
james_kleinschnitz Cireson Dev, Product Owner Advanced IT Monkey ✭✭✭@David_Allen & @Adam_Dzyacky
There is not a feature for this at the moment. Please submit a feature request for this and if the community agrees it is a need we will get it added.
Thanks5
Answers
$('div.panel.ro-request-on-behalf').hide();
Thanks for showing the code to hide the field, however do you know if there is a feature request to select whether the Create on Behalf Of field is available or not for a request offering?
Most of our offerings to end users require the Create on Behalf Of field as each department has a nominee that will fill submit the requests on behalf of the users, however we do have some offerings where we don't want this functionality for security reasons.
It would be nice if it was a selectable option, rather than having to update the custom.js file!
Thanks, David.
Who is this for?
- Me
- A direct report
- Someone else
Then using Advanced Request Offering, those Query Results are either hidden or flipped accordingly. In the last two options, the selected user is always related to the same object in the backend template. Using SCO and/or SMA runbooks, the Affected User is dynamically updated based on if this Relationship Object is found on said template.Even without ARO, this can be achieved by simply making an optionally selectable Query Result to the effect of "If this is for someone else, pick them here. Otherwise don't pick anything." It could be argued this is not as clean from a layout perspective, but still can leverage the aforementioned runbooks.
There is not a feature for this at the moment. Please submit a feature request for this and if the community agrees it is a need we will get it added.
Thanks
Thanks for the script. Unfortunately, I didn't get it to work. What I want is to show the 'Create Request on Behalf' field for that particular Request Offering. Using the script that you provided, I changed the 'hide' to 'show':
I then opened the Request Offering as an end user, but that field still wasn't displayed.
Hi @David_Allen.
Thanks for raising the feature request. I've voted to have this feature available as well.
For this to work the 'Create Request on Behalf' field has to be available. So if your settings are such that the field does not show by default there is no way to add it via code. You need to work your logic in reverse and hide the field when needed.
Thanks