WebCrmApiWriteToWebcrmDirect Method |
Updates an existing entity specified by organisationID and recordID
or creates a new one if the ids are empty.
If entityType is Organisations then organisationID and recordID must be equal.
Namespace: dk.webCRM.ApiSync.WebServiceAssembly: dk.webCRM.ApiSync.WebService (in dk.webCRM.ApiSync.WebService.dll) Version: 2.0.0.5 (2.0.0.5)
Syntaxpublic WriteToWebCrmResult WriteToWebcrmDirect(
DataEntityType entityType,
long organisationID,
long recordID,
WebCrmData data
)
Public Function WriteToWebcrmDirect (
entityType As DataEntityType,
organisationID As Long,
recordID As Long,
data As WebCrmData
) As WriteToWebCrmResult
public:
WriteToWebCrmResult^ WriteToWebcrmDirect(
DataEntityType entityType,
long long organisationID,
long long recordID,
WebCrmData^ data
)
member WriteToWebcrmDirect :
entityType : DataEntityType *
organisationID : int64 *
recordID : int64 *
data : WebCrmData -> WriteToWebCrmResult
Parameters
- entityType
- Type: dk.webCRM.ApiSync.BusinessLayer.EnumsDataEntityType
Entity type. - organisationID
- Type: SystemInt64
Organisation ID. - recordID
- Type: SystemInt64
Enitity identifier. - data
- Type: dk.webCRM.ApiSync.BusinessLayer.EntitiesWebCrmData
Collection of key-value pairs describing the entity.
Return Value
Type:
WriteToWebCrmResultError status and identifier of the processed entity.
The identifier can be useful while adding new entities.
Remarks
When creating a new table row for opportunity (create only) and the update value for opportunity/delivery number = "-1" (string)
then the API will assign the opportunity/delivery number using auto numbering according to the settings in webCRM.
Examples
WebCrmApiSoapClient proxy = new WebCrmApiSoapClient();
ErrorStatus errorStatus;
TicketHeader ticket = proxy.Authenticate("cm1111aaaaaa", "username", "password", out errorStatus);
WebCrmData organisationData = new WebCrmData
{
Pairs = new KeyValuePair[] {
new KeyValuePair("o_organisation", "Wates Construction"),
new KeyValuePair("o_divisionName", "Sharston"),
new KeyValuePair("o_telephone", "0161 946 8800"),
new KeyValuePair("o_fax", "0161 946 8800"),
new KeyValuePair("o_postcode", "M22 4BJ") }
};
WriteToWebCrmResult result = proxy.WriteToWebcrmDirect(
ticket, DataEntityType.Organisations, 0, 0, organisationData);
See Also