-
-
Notifications
You must be signed in to change notification settings - Fork 59
v1 DynamicsWebApi
- associate
- associateSingleValued
- count
- countAll
- create
- createAttribute
- createEntity
- createGlobalOptionSet
- createRelationship
- createRequest
- deleteGlobalOptionSet
- deleteRecord
- deleteRelationship
- deleteRequest
- disassociate
- disassociateSingleValued
- downloadFile
- executeBatch
- executeBoundAction
- executeBoundFunction
- executeFetchXml
- executeFetchXmlAll
- executeUnboundAction
- executeUnboundFunction
- fetch
- fetchAll
- initializeInstance
- retrieve
- retrieveAll
- retrieveAllRequest
- retrieveAttribute
- retrieveAttributes
- retrieveEntities
- retrieveEntity
- retrieveGlobalOptionSet
- retrieveGlobalOptionSets
- retrieveMultiple
- retrieveMultipleRequest
- retrieveRelationship
- retrieveRelationships
- retrieveRequest
- setConfig
- startBatch
- update
- updateAttribute
- updateEntity
- updateGlobalOptionSet
- updateRelationship
- updateRequest
- updateSingleProperty
- uploadFile
- upsert
- upsertRequest
• new DynamicsWebApi(config?
)
DynamicsWebApi constructor
Name | Type | Description |
---|---|---|
config? |
Config |
DynamicsWebApi configuration |
• Utility: Utility
Utility functions
• utility: Utility
Utility functions
Deprecated
please use dynamicsWebApi.Utility instead
▸ associate(collection
, primaryKey
, relationshipName
, relatedCollection
, relatedKey
, impersonateUserId?
): Promise
<any
>
Associate for a collection-valued navigation property. (1:N or N:N)
Name | Type | Description |
---|---|---|
collection |
string |
Primary Entity Collection name or Entity Name. |
primaryKey |
string |
Primary entity record id. |
relationshipName |
string |
Relationship name. |
relatedCollection |
string |
Related Entity Collection name or Entity Name. |
relatedKey |
string |
Related entity record id. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<any
>
▸ associateSingleValued(collection
, key
, singleValuedNavigationPropertyName
, relatedCollection
, relatedKey
, impersonateUserId?
): Promise
<any
>
Associate for a single-valued navigation property. (1:N)
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
key |
string |
Entity record Id that contains an attribute. |
singleValuedNavigationPropertyName |
string |
Single-valued navigation property name (usually it's a Schema Name of the lookup attribute). |
relatedCollection |
string |
Related collection name that the lookup (attribute) points to. |
relatedKey |
string |
Related entity record id that needs to be associated. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<any
>
▸ count(collection
, filter?
): Promise
<number
>
Sends an asynchronous request to count records. IMPORTANT! The count value does not represent the total number of entities in the system. It is limited by the maximum number of entities that can be returned. Returns: Number
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
filter? |
string |
Use the $filter system query option to set criteria for which entities will be returned. |
Promise
<number
>
▸ countAll(collection
, filter?
, select?
): Promise
<number
>
Sends an asynchronous request to count records. Returns: Number
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
filter? |
string |
Use the $filter system query option to set criteria for which entities will be returned. |
select? |
string [] |
An Array representing the $select Query Option to control which attributes will be returned. |
Promise
<number
>
▸ create<T
>(object
, collection
, prefer?
, select?
): Promise
<T
>
Sends an asynchronous request to create a new record.
Deprecated
Please use "createRequest". It will be easier to fix breaking changes once v2 is realeased.
Example
var lead = {
subject: "Test WebAPI",
firstname: "Test",
lastname: "WebAPI",
jobtitle: "Title"
};
dynamicsWebApi.create(lead, "leads").then(function (id) {
}.catch(function (error) {
});
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
object |
T |
A JavaScript object valid for create operations. |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
prefer? |
string | string [] |
Sets a Prefer header value. For example: ['retrun=representation', 'odata.include-annotations="*"']. |
select? |
string [] |
An Array representing the $select Query Option to control which attributes will be returned. |
Promise
<T
>
▸ createAttribute<T
>(entityKey
, attributeDefinition
): Promise
<T
>
Sends an asynchronous request to create an attribute.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
entityKey |
string |
The Entity MetadataId or Alternate Key (such as LogicalName). |
attributeDefinition |
Object |
Object that describes the attribute. |
Promise
<T
>
▸ createEntity<T
>(entityDefinition
): Promise
<T
>
Sends an asynchronous request to create an entity definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
entityDefinition |
Object |
Entity Definition. |
Promise
<T
>
▸ createGlobalOptionSet<T
>(globalOptionSetDefinition
): Promise
<T
>
Sends an asynchronous request to create a Global Option Set definition
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
globalOptionSetDefinition |
Object |
Global Option Set Definition. |
Promise
<T
>
▸ createRelationship<T
>(relationshipDefinition
): Promise
<T
>
Sends an asynchronous request to create a relationship definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
relationshipDefinition |
Object |
Relationship Definition. |
Promise
<T
>
▸ createRequest<T
>(request
): Promise
<T
>
Sends an asynchronous request to create a new record.
Example
var lead = {
subject: "Test WebAPI",
firstname: "Test",
lastname: "WebAPI",
jobtitle: "Title"
};
var request = {
entity: lead,
collection: "leads",
returnRepresentation: true
}
dynamicsWebApi.createRequest(request).then(function (response) {
}.catch(function (error) {
});
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
request |
CreateRequest <T > |
An object that represents all possible options for a current request. |
Promise
<T
>
▸ deleteGlobalOptionSet(globalOptionSetKey
): Promise
<any
>
Sends an asynchronous request to delete a Global Option Set.
Name | Type | Description |
---|---|---|
globalOptionSetKey |
string |
A String representing the GUID value or Alternate Key (such as Name). |
Promise
<any
>
▸ deleteRecord(key
, collection
, propertyName?
): Promise
<any
>
Sends an asynchronous request to delete a record.
Deprecated
Please use "deleteRequest". It will be easier to fix breaking changes once v2 is realeased.
Name | Type | Description |
---|---|---|
key |
string |
A String representing the GUID value or Alternate Key(s) for the record to delete. |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
propertyName? |
string |
The name of the property which needs to be emptied. Instead of removing a whole record only the specified property will be cleared. |
Promise
<any
>
▸ deleteRelationship(metadataId
): Promise
<any
>
Sends an asynchronous request to delete a relationship definition.
Name | Type | Description |
---|---|---|
metadataId |
string |
A String representing the GUID value. |
Promise
<any
>
▸ deleteRequest(request
): Promise
<any
>
Sends an asynchronous request to delete a record.
Name | Type | Description |
---|---|---|
request |
DeleteRequest |
An object that represents all possible options for a current request. |
Promise
<any
>
▸ disassociate(collection
, primaryKey
, relationshipName
, relatedKey
, impersonateUserId?
): Promise
<any
>
Disassociate for a collection-valued navigation property.
Name | Type | Description |
---|---|---|
collection |
string |
Primary Entity Collection name or Entity Name. |
primaryKey |
string |
Primary entity record id. |
relationshipName |
string |
Relationship name. |
relatedKey |
string |
Related entity record id. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<any
>
▸ disassociateSingleValued(collection
, key
, singleValuedNavigationPropertyName
, impersonateUserId?
): Promise
<any
>
Removes a reference to an entity for a single-valued navigation property. (1:N)
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
key |
string |
Entity record Id that contains an attribute. |
singleValuedNavigationPropertyName |
string |
Single-valued navigation property name (usually it's a Schema Name of the lookup attribute). |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<any
>
▸ downloadFile(request
): Promise
<DownloadResponse
>
Downloads a file from a file attribute
Name | Type | Description |
---|---|---|
request |
DownloadRequest |
An object that represents all possible options for a current request. |
Promise
<DownloadResponse
>
▸ executeBatch(request?
): Promise
<any
[]>
Executes a batch request. Please call DynamicsWebApi.startBatch() first to start a batch request.
Name | Type |
---|---|
request? |
BatchRequest |
Promise
<any
[]>
▸ executeBoundAction<T
>(id
, collection
, actionName
, requestObject?
, impersonateUserId?
): Promise
<T
>
Executes a bound Web API action (bound to a particular entity record)
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
id |
string |
A String representing the GUID value for the record (pass "null" for an optional parameter) |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
actionName |
string |
The name of the Web API action. |
requestObject? |
Object |
Action request body object. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<T
>
▸ executeBoundFunction<T
>(id
, collection
, functionName
, parameters?
, impersonateUserId?
): Promise
<T
>
Executes a bound function
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
id |
string |
A String representing the GUID value for the record. |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
functionName |
string |
The name of the function. |
parameters? |
Object |
Function's input parameters. Example: { param1: "test", param2: 3 }. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<T
>
▸ executeFetchXml<T
>(collection
, fetchXml
, includeAnnotations?
, pageNumber?
, pagingCookie?
, impersonateUserId?
): Promise
<FetchXmlResponse
<T
>>
Sends an asynchronous request to count records. Returns: DWA.Types.FetchXmlResponse
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
fetchXml |
string |
FetchXML is a proprietary query language that provides capabilities to perform aggregation. |
includeAnnotations? |
string |
Use this parameter to include annotations to a result. For example: * or Microsoft.Dynamics.CRM.fetchxmlpagingcookie |
pageNumber? |
number |
Page number. |
pagingCookie? |
string |
Paging cookie. For retrieving the first page, pagingCookie should be null. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<FetchXmlResponse
<T
>>
▸ executeFetchXmlAll<T
>(collection
, fetchXml
, includeAnnotations?
, impersonateUserId?
): Promise
<MultipleResponse
<T
>>
Sends an asynchronous request to execute FetchXml to retrieve all records.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
fetchXml |
string |
FetchXML is a proprietary query language that provides capabilities to perform aggregation. |
includeAnnotations? |
string |
Use this parameter to include annotations to a result. For example: * or Microsoft.Dynamics.CRM.fetchxmlpagingcookie |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<MultipleResponse
<T
>>
▸ executeUnboundAction<T
>(actionName
, requestObject?
, impersonateUserId?
): Promise
<T
>
Executes an unbound Web API action (not bound to a particular entity record)
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
actionName |
string |
The name of the Web API action. |
requestObject? |
Object |
Action request body object. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<T
>
▸ executeUnboundFunction<T
>(functionName
, parameters?
, impersonateUserId?
): Promise
<T
>
Executes an unbound function (not bound to a particular entity record)
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
functionName |
string |
The name of the function. |
parameters? |
Object |
Function's input parameters. Example: { param1: "test", param2: 3 }. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<T
>
▸ fetch<T
>(collection
, fetchXml
, includeAnnotations?
, pageNumber?
, pagingCookie?
, impersonateUserId?
): Promise
<FetchXmlResponse
<T
>>
Sends an asynchronous request to count records. Returns: DWA.Types.FetchXmlResponse
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
fetchXml |
string |
FetchXML is a proprietary query language that provides capabilities to perform aggregation. |
includeAnnotations? |
string |
Use this parameter to include annotations to a result. For example: * or Microsoft.Dynamics.CRM.fetchxmlpagingcookie |
pageNumber? |
number |
Page number. |
pagingCookie? |
string |
Paging cookie. For retrieving the first page, pagingCookie should be null. |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<FetchXmlResponse
<T
>>
▸ fetchAll<T
>(collection
, fetchXml
, includeAnnotations?
, impersonateUserId?
): Promise
<MultipleResponse
<T
>>
Sends an asynchronous request to execute FetchXml to retrieve all records.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
fetchXml |
string |
FetchXML is a proprietary query language that provides capabilities to perform aggregation. |
includeAnnotations? |
string |
Use this parameter to include annotations to a result. For example: * or Microsoft.Dynamics.CRM.fetchxmlpagingcookie |
impersonateUserId? |
string |
A String representing the GUID value for the Dynamics 365 system user id. Impersonates the user. |
Promise
<MultipleResponse
<T
>>
▸ initializeInstance(config?
): DynamicsWebApi
Creates a new instance of DynamicsWebApi
Name | Type | Description |
---|---|---|
config? |
Config |
configuration object. |
▸ retrieve<T
>(key
, collection
, select?
, expand?
): Promise
<T
>
Sends an asynchronous request to retrieve a record.
Deprecated
Please use "retrieveRequest". It will be easier to fix breaking changes once v2 is realeased.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
key |
string |
A String representing the GUID value or Alternate Key(s) for the record to retrieve. |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
select? |
string [] |
An Array representing the $select Query Option to control which attributes will be returned. |
expand? |
Expand [] |
A String or Array of Expand Objects representing the $expand Query Option value to control which related records need to be returned. |
Promise
<T
>
▸ retrieveAll<T
>(collection
, select?
, filter?
): Promise
<AllResponse
<T
>>
Sends an asynchronous request to retrieve all records.
Deprecated
Please use "retrieveAllRequest". It will be easier to fix breaking changes once v2 is realeased.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
select? |
string [] |
Use the $select system query option to limit the properties returned. |
filter? |
string |
Use the $filter system query option to set criteria for which entities will be returned. |
Promise
<AllResponse
<T
>>
▸ retrieveAllRequest<T
>(request
): Promise
<AllResponse
<T
>>
Sends an asynchronous request to retrieve all records.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
request |
RetrieveMultipleRequest |
An object that represents all possible options for a current request. |
Promise
<AllResponse
<T
>>
▸ retrieveAttribute<T
>(entityKey
, attributeKey
, attributeType?
, select?
, expand?
): Promise
<T
>
Sends an asynchronous request to retrieve a specific attribute metadata for a specified entity definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
entityKey |
string |
The Entity MetadataId or Alternate Key (such as LogicalName). |
attributeKey |
string |
The Attribute Metadata id. |
attributeType? |
string |
Use this parameter to cast the Attribute to a specific type. |
select? |
string [] |
Use the $select system query option to limit the properties returned. |
expand? |
Expand [] |
A String or Array of Expand Objects representing the $expand Query Option value to control which related records need to be returned. |
Promise
<T
>
▸ retrieveAttributes<T
>(entityKey
, attributeType?
, select?
, filter?
, expand?
): Promise
<RetrieveMultipleResponse
<T
>>
Sends an asynchronous request to retrieve attribute metadata for a specified entity definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
entityKey |
string |
The Entity MetadataId or Alternate Key (such as LogicalName). |
attributeType? |
string |
Use this parameter to cast the Attributes to a specific type. |
select? |
string [] |
Use the $select system query option to limit the properties returned. |
filter? |
string |
Use the $filter system query option to set criteria for which attribute definitions will be returned. |
expand? |
Expand [] |
A String or Array of Expand Objects representing the $expand Query Option value to control which related records need to be returned. |
Promise
<RetrieveMultipleResponse
<T
>>
▸ retrieveEntities<T
>(select?
, filter?
): Promise
<RetrieveMultipleResponse
<T
>>
Sends an asynchronous request to retrieve entity definitions.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
select? |
string [] |
Use the $select system query option to limit the properties returned. |
filter? |
string |
Use the $filter system query option to set criteria for which entity definitions will be returned. |
Promise
<RetrieveMultipleResponse
<T
>>
▸ retrieveEntity<T
>(entityKey
, select?
, expand?
): Promise
<T
>
Sends an asynchronous request to retrieve a specific entity definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
entityKey |
string |
The Entity MetadataId or Alternate Key (such as LogicalName). |
select? |
string [] |
Use the $select system query option to limit the properties returned. |
expand? |
Expand [] |
A String or Array of Expand Objects representing the $expand Query Option value to control which related records need to be returned. |
Promise
<T
>
▸ retrieveGlobalOptionSet<T
>(globalOptionSetKey
, castType?
, select?
): Promise
<T
>
Sends an asynchronous request to retrieve Global Option Set definitions.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
globalOptionSetKey |
string |
The Global Option Set MetadataID or Alternate Key (such as Name). |
castType? |
string |
Use this parameter to cast a Global Option Set to a specific type. |
select? |
string [] |
Use the $select system query option to limit the properties returned |
Promise
<T
>
▸ retrieveGlobalOptionSets<T
>(castType?
, select?
): Promise
<RetrieveMultipleResponse
<T
>>
Sends an asynchronous request to retrieve Global Option Set definitions.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
castType? |
string |
Use this parameter to cast a Global Option Set to a specific type. |
select? |
string [] |
Use the $select system query option to limit the properties returned |
Promise
<RetrieveMultipleResponse
<T
>>
▸ retrieveMultiple<T
>(collection
, select?
, filter?
, oDataLink?
): Promise
<RetrieveMultipleResponse
<T
>>
Sends an asynchronous request to retrieve records.
Deprecated
Please use "retrieveMultipleRequest". It will be easier to fix breaking changes once v2 is realeased.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
collection |
string |
The name of the Entity Collection or Entity Logical name. |
select? |
string [] |
Use the $select system query option to limit the properties returned. |
filter? |
string |
Use the $filter system query option to set criteria for which entities will be returned. |
oDataLink? |
string |
Use this parameter to pass @odata.nextLink or @odata.deltaLink to return a necessary response. Pass null to retrieveMultipleOptions. |
Promise
<RetrieveMultipleResponse
<T
>>
▸ retrieveMultipleRequest<T
>(request
, oDataLink?
): Promise
<RetrieveMultipleResponse
<T
>>
Sends an asynchronous request to retrieve records.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
request |
RetrieveMultipleRequest |
An object that represents all possible options for a current request. |
oDataLink? |
string |
Use this parameter to pass @odata.nextLink or @odata.deltaLink to return a necessary response. Pass null to retrieveMultipleOptions |
Promise
<RetrieveMultipleResponse
<T
>>
▸ retrieveRelationship<T
>(metadataId
, relationshipType?
, select?
): Promise
<T
>
Sends an asynchronous request to retrieve a specific relationship definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
metadataId |
string |
String representing the Metadata Id GUID. |
relationshipType? |
string |
Use this parameter to cast a Relationship to a specific type: 1:M or M:M. |
select? |
string [] |
Use the $select system query option to limit the properties returned. |
Promise
<T
>
▸ retrieveRelationships<T
>(relationshipType?
, select?
, filter?
): Promise
<RetrieveMultipleResponse
<T
>>
Sends an asynchronous request to retrieve relationship definitions.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
relationshipType? |
string |
Use this parameter to cast a Relationship to a specific type: 1:M or M:M. |
select? |
string [] |
Use the $select system query option to limit the properties returned. |
filter? |
string |
Use the $filter system query option to set criteria for which relationships will be returned. |
Promise
<RetrieveMultipleResponse
<T
>>
▸ retrieveRequest<T
>(request
): Promise
<T
>
Sends an asynchronous request to retrieve a record.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
request |
RetrieveRequest |
An object that represents all possible options for a current request. |
Promise
<T
>
▸ setConfig(config
): void
Sets DynamicsWebApi configuration parameters.
Example
dynamicsWebApi.setConfig({ webApiVersion: '9.1' });
Name | Type | Description |
---|---|---|
config |
Config |
configuration object |
void
▸ startBatch(): void
Starts a batch request.
void
▸ update<T
>(key
, collection
, object
, prefer?
, select?
): Promise
<T
>
Sends an asynchronous request to update a record.
Deprecated
Please use "updateRequest". It will be easier to fix breaking changes once v2 is realeased.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
key |
string |
A String representing the GUID value or Alternate Key(s) for the record to update. |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
object |
T |
A JavaScript object valid for update operations. |
prefer? |
string | string [] |
If set to "return=representation" the function will return an updated object |
select? |
string [] |
An Array representing the $select Query Option to control which attributes will be returned. |
Promise
<T
>
▸ updateAttribute<T
>(entityKey
, attributeDefinition
, attributeType?
, mergeLabels?
): Promise
<T
>
Sends an asynchronous request to update an attribute.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
entityKey |
string |
The Entity MetadataId or Alternate Key (such as LogicalName). |
attributeDefinition |
Object |
Object that describes the attribute. |
attributeType? |
string |
Use this parameter to cast the Attribute to a specific type. |
mergeLabels? |
boolean |
Sets MSCRM.MergeLabels header that controls whether to overwrite the existing labels or merge your new label with any existing language labels. Default value is false. |
Promise
<T
>
▸ updateEntity<T
>(entityDefinition
, mergeLabels?
): Promise
<T
>
Sends an asynchronous request to update an entity definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
entityDefinition |
Object |
Entity Definition. |
mergeLabels? |
boolean |
Sets MSCRM.MergeLabels header that controls whether to overwrite the existing labels or merge your new label with any existing language labels. Default value is false. |
Promise
<T
>
▸ updateGlobalOptionSet<T
>(globalOptionSetDefinition
, mergeLabels?
): Promise
<T
>
Sends an asynchronous request to update a Global Option Set.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
globalOptionSetDefinition |
Object |
Global Option Set Definition. |
mergeLabels? |
boolean |
Sets MSCRM.MergeLabels header that controls whether to overwrite the existing labels or merge your new label with any existing language labels. Default value is false. |
Promise
<T
>
▸ updateRelationship<T
>(relationshipDefinition
, relationshipType?
, mergeLabels?
): Promise
<T
>
Sends an asynchronous request to update a relationship definition.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
relationshipDefinition |
Object |
Relationship Definition. |
relationshipType? |
string |
Use this parameter to cast the Relationship to a specific type. |
mergeLabels? |
boolean |
Sets MSCRM.MergeLabels header that controls whether to overwrite the existing labels or merge your new label with any existing language labels. Default value is false. |
Promise
<T
>
▸ updateRequest<T
>(request
): Promise
<T
>
Sends an asynchronous request to update a record.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
request |
UpdateRequest <T > |
An object that represents all possible options for a current request. |
Promise
<T
>
▸ updateSingleProperty<T
>(key
, collection
, keyValuePair
, prefer?
, select?
): Promise
<T
>
Sends an asynchronous request to update a single value in the record.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
key |
string |
A String representing the GUID value or Alternate Key(s) for the record to update. |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
keyValuePair |
Object |
keyValuePair object with a logical name of the field as a key and a value to update with. Example: {subject: "Update Record"} |
prefer? |
string | string [] |
If set to "return=representation" the function will return an updated object |
select? |
string [] |
An Array representing the $select Query Option to control which attributes will be returned. |
Promise
<T
>
▸ uploadFile(request
): Promise
<void
>
Uploads a file to a file attribute
Name | Type | Description |
---|---|---|
request |
UploadRequest |
An object that represents all possible options for a current request. |
Promise
<void
>
▸ upsert<T
>(key
, collection
, object
, prefer?
, select?
): Promise
<T
>
Sends an asynchronous request to upsert a record.
Deprecated
Please use "upsertRequest". It will be easier to fix breaking changes once v2 is realeased.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
key |
string |
A String representing the GUID value or Alternate Key(s) for the record to upsert. |
collection |
string |
The name of the Entity Collection or Entity Logical name. |
object |
T |
A JavaScript object valid for update operations. |
prefer? |
string | string [] |
If set to "return=representation" the function will return an updated object |
select? |
string [] |
An Array representing the $select Query Option to control which attributes will be returned. |
Promise
<T
>
▸ upsertRequest<T
>(request
): Promise
<T
>
Sends an asynchronous request to upsert a record.
Name | Type |
---|---|
T |
any |
Name | Type | Description |
---|---|---|
request |
UpsertRequest <T > |
An object that represents all possible options for a current request. |
Promise
<T
>