- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 11:39 AM
How to auto populate the country value from the user record.??
i have created a catalog variable and used reference type. (Table : Core_country)
Should i give any default value in the variable using Java script or write onLoad catalog client script . Tried both yet the value will be empty or undefined.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 11:46 AM
Hi,
try the solution proposed in the below threas, it should fit your need:
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 11:46 AM
Hi,
try the solution proposed in the below threas, it should fit your need:
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 10:04 AM
Hello Alberto,
Thank you for response. It worked out well.
But I have a condition where the "requested by" and "requested for" will be different, Then how will be the case of getting the "requested for" country details using this scenario.
Thank you in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 11:47 AM
IF you need logged in users' country, then you can use below as default value in country reference field
gs.getUser().getCompanyID(); |
if You need country value based on user variable, then you need to configure on load client script, Glideajax to populate users' country based on user record.
Regards,
Sachin