How to limit the dropdown choices on a record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 06:37 AM
I have a quick link added on portal "submit a request" under a topic "procurement", when I will click on that link it will redirect me to a record producer and on the record producer there is a category filed which has multiple choices.
The requirements here is that, when i will click on "submit a request" link from the procurement tab then only 1 choice should be visible for example "x" and other choices should be hidden in category dropdown, but if i click the same link from any other topic or section then ,the category field should show all the choices.
Any guidance will be helpful!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 08:06 AM
@Sanket Pawar : As the URL's will be different while coming to this record producer from different places, you can use the URL to identify and add the logic to delete the options.
Below is the code. I tried to differentiate between the native UI and the portal.
function onLoad() {
var url = top.location.href.toString();
if (url.indexOf('/sp') < 0) { // '/sp' can be replaced with the differentiator you find between your two URL's.
alert('Native UI');
} else {
alert('Portal'); // Add your logic here to remove options
}
}
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 09:42 AM
Hi @Sainath N ,
But in this case there is no differentiator in 2 URLs.
I have 2 tabs
1)procurement ->submit a request link
2)Finance >submit a request link
both the links are same but what i have observed that both the tabs have a unique topic id in the url, which gets dissppeared when click on the submit a request link
is there any way to copy the topicid/sysid from previous tab and compare it to the other page after redirection?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 09:48 AM
@Sanket Pawar : In this case, I can think of only duplicating the record producer and making each one available in the required category of the service portal.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.