Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to get the Sales region based on Country name and zip code?

Posted on by 140

Hi,

How to get the Sales region like EMEA, NA, LATAM, APAC   based on country field value in lead entity. can any one please suggest me? Its very urgent.    Thanks in Advance.

*This post is locked for comments

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: How to get the Sales region based on Country name and zip code?

    Also, what entity is this for (contact/account/custom)? If contact/account are you using the OOB fields or custom fields that you created?

    What is the data type of the country and region fields?

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: How to get the Sales region based on Country name and zip code?

    Country field is lookup of custom entity country?? and what is filed type of sales region??

  • RE: How to get the Sales region based on Country name and zip code?

     Hi   Shahbaaz Ansari                          we have Country field in dynamic CRM. when I save or updated the  lead automatically with country name then  sales region will be show in custom field based on country. for example I entered Country name is "India" then custom field should display "BRICS" automatically.

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: How to get the Sales region based on Country name and zip code?

    The question is whether or not the Sales Region and Country fields are lookup, or other type of fields.

    Option 1:

    Create an Entity called Country and an entity called Region

    In the Country entity add a lookup to the Sales Region so that every country has an associated Sales Region

    In your entity where you want to implement the logic add the Country and Region lookups, and in the Region properties of the lookup add Related Records Filtering so that it shows only the records where Country Contains Region.

    Option 2:

    Create an Entity called Country.

    In the Country entity have fields that map that country to a region.

    When a Country is entered in your entity (on the change event), call the webapi to query the Country entity and retrieve the value of the Region and populate it in the Region field on your form.

    If you need help constructing your web api query, you can use CRM Rest Builder.

    github.com/.../CRMRESTBuilder

    Hope this helps.

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: How to get the Sales region based on Country name and zip code?

    Hi Reddy,

    can you describe your requirement clearly, i am not able to understand.

    Thanks,

    Shahbaaz

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

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans