Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

FetchXML query

Posted on by 815

Using fetchxml I have an account name and a secondary name but I want the secondary name to override the account name if it contains data. Is there a simple way I can do this using fetchXML. The data is used to dynamically populate a lookup on the D365 portal

 

Thanks G

*This post is locked for comments

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: FetchXML query

    In liquid you can use client script code to manipulate your entity form fields. if you have alread tried it, share it here for checking.

  • gman0104 Profile Picture
    gman0104 815 on at
    RE: FetchXML query

    Since i am dealing with Portals and Liquid I will have to retrieve the account name and secondary name and the used liquid to override the account name if the secondary name exists to populate my dropdown which will be a mixture of account name and secondary names

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: FetchXML query

    Hi,

    FetchXML is used to retrieve the data. To update the data, need to write some custom logic using either of the following - Workflow, Plugins, JS etc.

    I guess for you the best option would be to use a real time workflow on account entity which triggers on create & onchange of secondary name. Within that workflow, you can update the account name with secondary name.

    Hope this helps.

  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: FetchXML query

    Hi

    I believe there is no way to do it on the fetchxml. You can fetch both data (primary and secondary), then on your logic if the primary is null, you pick the other way.

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: FetchXML query

    Hi,

    Can you share some more details what you are trying to do, you can write JS/Jquery code to set field value on the portal but you can share some more details it will help.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: FetchXML query

    Hi,

    First,which method you would like to use? workflow, plugin or etc?

    You can create a workflow to do that, trigger on update and create, check if secondary name contain data, then create a update step to update the primary name.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans