Reputation: 191
I'm creating Quotes in own calculation system and exporting them to MS CRM 2011 throught REST API with credentials of users. Then those quotes are displayed in CRM as theirs (as if they created it by clicking in CRM). But now we want to edit privilege, so users can these quote only read. But this mean, that throught REST API I'm unable to create quote with their credentials. Is there a way how to create new Quote as user, which has read-only access throught web? Or is it possible to change authorship after quote was created?
Upvotes: 0
Views: 850
Reputation: 15128
To set the record's owner inside CRM 2011 there are 3 ways:
ownerid
field when you create the record (C# example)Entity quote = new Entity("quote");
// set the fields
// ...
// set the owner
Guid ownerId = new Guid("BFC777ED-5E79-E111-8489-00166D63156F");
quote["ownerid"] = new EntityReference("systemuser", ownerId);
service.Create(quote);
AssignRequest
message to update the record's owner, as explained in this article: MSDN - AssignRequest ClassIn your case when you create the quote using the REST API you need to set the ownerid
field with the GUID of the selected user.
Is not possible to change the owner of an existing record using REST.
Upvotes: 4