I would like to get the value "Philippines" from the lookup field. Currently, what's being displayed is the whole lookup with its GUID and schema.
*This post is locked for comments
I would like to get the value "Philippines" from the lookup field. Currently, what's being displayed is the whole lookup with its GUID and schema.
*This post is locked for comments
Hi All,
Thank you for your inputs! I have achieved my desired output in USD by creating an Action Call: Run Script
function getCountryText() {
var country = "[[lead.pre_ountry]+]";
var splitCountry = country.split(",");
var countryText = splitCountry[2].slice(0, -1);
return countryText;
}
getCountryText()
Hi, the country field from the parameters returns schema+GUID+text, I'm thinking on how can I get the text throught USD parameters.
e.g. [[country.countrytext]]
function getCountryName()
{
var country = Xrm.Page.getAttribute("new_countrylookupfield").getValue();
if (country != null)
{
var countryname = country[0].name;
}
}
The name of the country, such as "Philippines" is then stored in the countryname variable and you can use it in a string field.
Rich
Hi,
I think you are adding the all lookup object to your text. You only need to add the name part of the lookup object. A lookup object is composed of 3 values:
1. id
2. entityname
3. recordname.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156