New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a Lookup to existing entity #65
Comments
Can you show some code - how are you setting the lookup reference? |
`dynamic newCustomEntity = new ExpandoObject(); dynamic primaryContact = new ExpandoObject(); newCustomEntity.contactlookup_id = primaryContact; var result = await crmAPI.Create("new_customentity", newCustomEntity); ` Can't get it to paste as code, but that should show what I'm trying to achieve (probably incorrectly) |
Hi @davidyack just wondered if you had any ideas about this? I'd rather stick with your solution than go with the full framework and the SDK. My goal is to create a child entity, then link it to a parent entity. Is there a better way to achieve this? Thanks in advance |
Sorry I missed the notification on your prior message - if the contact already exists your contactlookup_id needs to have a value more like "/contacts(guid)" assuming contactlookup_id is in fact your correct navigation property and contact is an existing record |
Hi
I am trying to create an entity, but give it a lookup to an existing entity.
Is this possible? Currently the Create is also trying to generate the lookup entity, which fails as a key already exists.
Thanks
The text was updated successfully, but these errors were encountered: