Hide/Show drop down values based on another reference field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 05:12 AM
Hi All,
Based on Country selection, languages should be displayed in Language field on customer_contact record.
1)Country reference field (core_country)
2)Language is drop down list
Ex : Country : Austria , Languages : English, German
Country : Canada , Languages : English
Country : Netherlands , Languages : English, Dutch
Can anyone help me on this requirement. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 07:42 PM
You can use a client script for that.
You have to provide the Syd_id of the country like :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2023 01:36 AM
Hi @Satyapriya,
Thanks for your reply.
Country list is to big. So, any other way like configure County & Languages in system property and fetch that property in script. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2023 03:32 AM
unfortunately you could not since gs.getProperty('name') only works in server side
If you want to store the property value then you can use a display business rule and in the g_scratchpad variable you can store the property and access it from client side.
Please mark it as solution if it's helpful to you.
Regards,
Satyapriya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 03:09 AM
Hi, Below I'm sharing the script . Please, correct me where am I doing mistake.
system property : {"Austria":["English","French"],"Canada":["English"],"Netherlands":["French","Dutch"]}
SI:
getCountry: function() {
var v_country = this.getParameter('sysparm_country');
var fetchLanguageProp = gs.getProperty('country.to.language.mapping');
var result = JSON.parse(fetchLanguageProp);
return result.v_country;
},
CS:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 03:28 AM
can you alert the answer and check what are you getting there?
Raghav
MVP 2023