web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    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

  • Community Member Profile Picture
    on at

    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

    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

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    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
    Community Member Profile Picture
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans