Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how to get the guid of the second entity..

(0) ShareShare
ReportReport
Posted on by

Hi,

I have two related entities(parent,child).. if i created an record in child, i have to update the child record with pared details for this i need the guid of the child entity.. how can i get the guid of the child entity..

Thanks in advance..

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: how to get the guid of the second entity..

    Hi,

    You can use EntityCollection method  to retrieve multiple records of child entity And  pass the parameter in method and use fetch xml there you can pass the value parameter like this

    "'+your parameter name+'".

    Example

    <filter type="and">'+

    '<condition attribute="childid" operator="eq" value=""+your parameter name+"" /> '+

    From this collection you can able to get the id's of child records.

    Hope it helps:)

    Thanks

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at
    RE: how to get the guid of the second entity..

    Hi Varun,

    You can get the Guid of created child record like this:

    Guid childRecordId = serviceObj.Create(childentityObj);

    serviceObj.Retrieve("ChildEntitySchemaName"childRecordId, new ColumnSet("field1","field2","fieldn"));

     

    If you find the answer as useful, please mark it as verified

     

    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

     

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: how to get the guid of the second entity..

    Hi Varun ,

    If you have parent child relationship then you should have referential I'd in the child account  right . You can refer here how to write query using web api.

    docs.microsoft.com/.../query-data-web-api

  • Community Member Profile Picture
    on at
    RE: how to get the guid of the second entity..

    hi,

    to retrieve the records from a child entity i need to pass the parameters for retrieve method

    for retrieveing how can i get the id of the child entity record

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: how to get the guid of the second entity..

    Hi Varun,

    I am sorry I could not understand your questions properly.

    As per my assumption you need to retrieve the  related record or may be parent record.

    You can retrieve many way using fetchxml , using web api , using query expression....

    Here is some links which you can refer.

    Using web api

    www.inogic.com/.../querying-data-in-microsoft-dynamics-crm-2016-using-web-api

    ideas.dynamics.com/.../ID0001004

    Using query expression

    community.dynamics.com/.../retrieve-related-entity-records-along-wih-the-primary-entity-using-retrieve-method

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans