Create on Behalf - Function / Customization
We've recently updated our portal to v6, it's giving us the ability to control who has access to it using AD groups. this is very useful. Though we would like to have a little more control over it as quite honestly, it's seems to be confusing for some of our users. I don't blame them. Let me explain.
The Box/Field suggest to "Pick One..." and it's a drop down style box, now user's are simply clicking on the drop-down and selecting one of the 10 items in the drop down. A factor that is causing this confusion is the Create on Behalf field is also pulling in Distribution Lists from AD for some reason, and the first 10 results so happens to be distribution lists of locations, so the users are selecting the DL that applies to their location.
My Question:
- Can we modify the query that the "Create on behalf of" field uses to pull the results.
- Can we change the text in the field to mention something a little specific.
Comments
I don't disagree-- that picker can be a bit confusing. Attached is a bit of code that I think improves it. Feel free to use whatever bits and pieces you like.
(1) Rather than allowing the analyst to immediately type in the user picker, they must first choose that they want to create on behalf of:
(2) Once they pick Yes, the picker appears as usual; however, notice the "placeholder text" now reads "Search for User" instead of the default "Choose One..."
The code I used to accomplish this is attached. It would need to be copied into your custom.js file. If you don't want the feature in (1) above, you can comment out or delete lines 6-21. If you want to change the placeholder text, that can be done on line 24.
Two other tidbits outside of the attached code:
(3) The actual "Create Request On Behalf Of" text can be changed in the localization section of the portal. The key you would override is "CreateRequestonbehalfof"
(4) Changing what results appear once you start typing can be configured in the Admin Settings portion of the Portal. The keys you would modify in this case are "UserQuery" and "GroupQuery." If there is a particular attribute unique to all your Distribution Groups, you can add them to these search filter settings to omit them.
Thanks,
Nick
Do you think it is also possible to use ExtraProps under this picker also? I have a customer that has thousands of users, some of which can have the same full name. The customer would like to see the unique username underneath the selected user if possible.
Thanks,
David
Hi John - I found the easiest way to do this is to create an override for the CreateRequestofBehalfOf locatization (Under the Admin menu).
Cheers,
David
@john_doyle As @David_Meldrum mentioned, a simple override is a great approach here. On that note, if anyone is planning on changing the wording so that "Yes" would hide the box, and "No" would show it, you could most quickly accomplish that by changing the button labels defined on line 10. You could also change the order by switching the two <input> tags if you like.
Love this customisation! Thanks Nick!
I did something similar as shown in the pic.
Pretty much the same thing, but with a couple of ammendments.
Was thinking we should add this to the Community or Cireson Uploads section Would be happy to add your behalf's as I think this is a nice add-on!
I have created a post in the Uploads section for this customization here: https://community.cireson.com/discussion/1898/create-request-on-behalf-of-radio-buttons-and-text-change
Any change some here can help me get this working?
https://community.cireson.com/discussion/comment/5767