Skip to content
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

Why Simple.Odata.Client requires autogenerated "Id" to be passed with proper value while inserting record in D365Crm API #901

Open
Najjaf opened this issue Apr 5, 2023 · 0 comments

Comments

@Najjaf
Copy link

Najjaf commented Apr 5, 2023

Hi, we have integrated Simple.Odata.Client in one of our application to interact with D365 Crm API. We can create different entity records but, we are confused why it requires the uniqueIdentifier "Id" to be passed with proper value while creating a record in D365Crm? provided that, CRM itself maintains uniqueIdentifier. For example,

We are creating a Contact record as below,

var result = await client.For().Set(new Contact { Id = Guid.NewGuid(), Name = "Test Contact"}).InsertEntryAsync();
return result.Id;

Here we are forced to pass the "Id" with new Guid while D365Crm manages itself. If we don't pass this value, we are getting below error,

"d365crm Expected non-empty Guid"

Would anyone be able to help us?

Thanks,
Najjaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant