dynamics-crm-webapi

CRM do not support direct update of Entity Reference properties, Use Navigation properties instead

北城以北 提交于 2019-12-21 10:47:03
问题 I am using Ms Dynamic Web Api with Simple OData. I need to add new record for link entities. I am using the below code snip and refer the documentation on https://github.com/object/Simple.OData.Client/wiki/Adding-entries-with-links var newContactData = await _oDataClient .For<Contacts>() .Set(new { firstname = contactData.ContatDetails.firstname, lastname = contactData.ContatDetails.lastname, emailaddress1 = contactData.ContatDetails.emailaddress1 }) .InsertEntryAsync(true); var

Create annotation to a contact entity in Microsoft Dynamics CRM by API

北战南征 提交于 2019-12-17 19:57:42
问题 This question is related to Microsoft Dynamics CRM 2015, that I'm calling through API. I create contact entity: POST [organization URI]/api/data/contacts Content-Type: application/json; charset=utf-8 Accept: application/json { "emailaddress1": "myemail@example.com", } It works, I see new record, after I log into the panel. And I can call it through the API: [organization URI]/api/data/contacts(f76e4e7c-ea61-e511-80fd-3863bb342b00) { "@odata.context":"[organization URI]/api/data/$metadata

API $expand and &count

假装没事ソ 提交于 2019-12-14 03:59:01
问题 Is it possible to use $expand but instead of returning a collection of objects, just return the count of objects? For example, get an account and a count of its annotations in a single WebApi call I've tried a few things. Obvious attempt: accounts(6CDEEB72-2AC8-E711-A825-000D3AE0A7F8)?$select=name&$expand=Account_Annotation($count=true) returns all fields of all Annotations but doesn't count anything. Next I tried accounts(6CDEEB72-2AC8-E711-A825-000D3AE0A7F8)?$select=name&$expand=Account

Share access programmatically Dynamics CRM web api

一世执手 提交于 2019-12-13 08:30:07
问题 Is there an action to programmatically share (GrantAccess) a phonecall activity to other user (systemuser) through Dynamics CRM web api (v8.1) ? As far as seen only samples is through organization services. 回答1: GrantAccess message will be available in v9.0 web api. MSDN declared this as limitation as of v8.2 webapi. Missing functions and actions for some organization service messages The following table lists the messages that don't have a corresponding function or action after December 2016

Resolve error on deep insert of navigation property Dynamics WebAPI

不打扰是莪最后的温柔 提交于 2019-12-10 10:53:32
问题 I am using the Microsoft Dynamics Web API to write data to an entity in Microsoft Dynamics 365. When I try to do a deep insert I am receiving the error An undeclared property 'ccseq_employeeid' which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values. Why am I receiving this error and how can I resolve the error? JSON { "ccseq

Bad request error while adding a lookup GUID field in CRM database using Web API

ⅰ亾dé卋堺 提交于 2019-12-07 07:10:01
问题 I want to insert a new record in CRM's custom entity where one of the fields is of lookup type i.e. new_contactid and it is dependent on the contact entity. I have also referred Set Values of all Data Types using Web API in Dynamics CRM Through C#. My JSON data is as below: { "new_transactionnumber":"114", "new_transactionamount":650, "new_transactiondate":"2018-01-29T15:01:00.000Z", "new_contactid_contact@odata.bind":"/contacts(afb9e006-6be5-e711-80ed-bef806786223)", "new_moveid_new_move

Retrieving Entity Metadata using web api

↘锁芯ラ 提交于 2019-12-06 15:48:34
we have a requirement where we have to retrieve an Entity's Metadata. Exact requirement: Im reading a field value on a form which ia having "entity schema name". With that I need to get that Entity's primary key schema name. Is it possible? If so please help me. Eg: in that field if I enter "lead" , that web api should fetch me "leadid" and store it in another field. 2. If I enter "incident" , that web api should get me "incidentid" You don't need do retrieve entity metadata for that, primary key is always "entity schema name" + "id", there are no exceptions from that rule. If you still want

Resolve error on deep insert of navigation property Dynamics WebAPI

无人久伴 提交于 2019-12-06 11:21:51
I am using the Microsoft Dynamics Web API to write data to an entity in Microsoft Dynamics 365. When I try to do a deep insert I am receiving the error An undeclared property 'ccseq_employeeid' which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values. Why am I receiving this error and how can I resolve the error? JSON { "ccseq_importdate" : "2017-05-28T04:00:00Z", "ccseq_month" : "1", "ccseq_year" : "2017", "ccseq_name" : "Test",

Creating Post with Dynamics CRM Web API

笑着哭i 提交于 2019-12-04 23:22:00
问题 A Post entity (https://msdn.microsoft.com/en-us/library/mt607553.aspx) cannot be created using Dynamics CRM 2016 Online Web API. This payload should create a post on POST /api/data/v8.1/posts { "text": "Test Single Post", "source": 1, "type": 7 } (source 1 is an auto post, type 7 is a status post) But it returns: { "error": { "code":"", "message":"An unexpected error occurred.", "innererror" { "message":"An unexpected error occurred..." } } } Submitting the same payload with only "text" fails

CRM do not support direct update of Entity Reference properties, Use Navigation properties instead

只谈情不闲聊 提交于 2019-12-04 04:15:42
I am using Ms Dynamic Web Api with Simple OData. I need to add new record for link entities. I am using the below code snip and refer the documentation on https://github.com/object/Simple.OData.Client/wiki/Adding-entries-with-links var newContactData = await _oDataClient .For<Contacts>() .Set(new { firstname = contactData.ContatDetails.firstname, lastname = contactData.ContatDetails.lastname, emailaddress1 = contactData.ContatDetails.emailaddress1 }) .InsertEntryAsync(true); var newContactLink = await _oDataClient.For<New_project_contactses>() .Set(new { _new_contact_project_name_new_value =