Skip to main content

Notifications

Microsoft Dynamics CRM forum
Suggested answer

Populate Lookup Entity Text field using workflow or Javascript

Posted on by 2,352
Hi Guys
I have the following example scenario to illustrate the requirement. On sales order a new lookup field is created for countries. Countries entity contain guid (PK), code (AU,NZ) and Description (Australia). Now when I create the relationship as expected I can select a country in order form. My requirement is to populate a custom field on the order with the country code instead of guid. I know how to do this via Javascript. Can the same be achieved via workflow when saving the record (only required after saving for integration to another system). Related question is what are pros and cons of using:
1. Javascript
2.Workflow (classic not PA)
3. plugin
 
The problem I have with plugins is its complicated when using "update" event as a user may update the country selection after the initial insert. 
My biggest problem with JS is code maintenance , its all over the place and I cannot easily see everything in VS code or VS like plugin. I wonder how people manage JS code without loosing track. Classic workflow i havent played around much but some talk of MS deprecating. I dont like PA no code stuff as its hard understand after adding 10-20 steps unlike C# programming plus licensing is an issue when working with clients. 
  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 7,390 Super User 2024 Season 1 on at
    Populate Lookup Entity Text field using workflow or Javascript
    You can use workflow without any issue. You have also mentioned about the integration, what is It related with this requirement?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Give Back to the Community this Month

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,807 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,135 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans