Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

a quick help on fetch xml

Posted on by Microsoft Employee

Hi Friends,

55106.Capture.PNG

My requirement is to get the account id using that parent account number. 

I have attached a screen shot of fetch xml here. IS it right way to get what I want. please help me.

*This post is locked for comments

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: a quick help on fetch xml

    Hi,

    if you stored the parent account number in every child account, then you can go ahead.

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: a quick help on fetch xml

    Not sure what screen shot you are looking for, the query I shared, will be fetching all the account which parent customers number is 123, based on your question.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: a quick help on fetch xml

    Yes I want all the parent account number because my intension is to fire plugin on the change of parent Account Number field of the account entity. So do you think the fetch xml, I selected will help me, please reply.

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: a quick help on fetch xml

    Hi,

    if the parent account number is 1234, and you want to find those account which using parent account number 1234. With your fetchxml, you not only getting accounts with parent account number with 1234, but also others ( parent account number with 5678). Are you sure?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: a quick help on fetch xml

    yes, all account, not specific. so the one I shared, is that correct. But then I dont get that link-entity in my fecth query, is it okay?

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: a quick help on fetch xml

    Hi,

    you should use equal operator in the filter right? i thought you want to get specific accountid. With your fetchxml, you will get all account with parent account number is not empty.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: a quick help on fetch xml

    I am adding screenshot to show you what I am using and what I am getting, but hopefully link-entity may help is what I am assuming. Yet please check the screen shot to tell me if the fetch xml looks good, my intention is to get the account id using that parent account number.

    52818.Capture.PNG

    Thanks

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: a quick help on fetch xml

    Hi,

    go for related record and select the highlighted area.

    8713.25.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: a quick help on fetch xml

    when I use the 1st screen shot, i dont get link entity. can you please share the first screen shot again, Alex.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: a quick help on fetch xml

    Hi Mahen, Please share the screen shot too

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