このアクションは、営業案件、見積もり、受注または請求書エンティティでボックス価格計算からトリガーするために使用されます。 このアクションは、サーバーとクライアントの呼び出しの両方に適用されます。
パラメーター
| Name | タイプ | 必須出席者 | 説明 |
|---|---|---|---|
| entityLogicalName | String | あり | エンティティの論理名 |
| entityId | GUID | あり | エンティティ GUID |
例
サーバーの呼び出し
要求
POST [Organization URI]/api/data/v9.1/RecalculatePrice
{
"entityLogicalName": "quote",
"entityId":"00aa00aa-bb11-cc22-dd33-44ee44ee44ee"
}
応答
HTTP/1.1 204 No Content
OData-Version: 4.0
クライアントの呼び出し
function RecalculatePrice(formContext) {
var recalculatePriceRequest = {
entityId: formContext.data.entity.getId(),
entityLogicalName: formContext.data.entity.getEntityName(),
Target: parameters.Target,
getMetadata: function () {
return {
boundParameter: null,
parameterTypes: {
"entityId": {
"typeName": "Edm.Guid",
"structuralProperty": 5,
},
"entityLogicalName": {
"typeName": "Edm.String",
"structuralProperty": 1,
},
},
operationType: 0,
operationName: "RecalculatePrice"
};
}
};
Xrm.WebApi.online.execute(recalculatePriceRequest).then(
function success(result) {
if (result.ok) {
//Success
}
},
function (error) {
Xrm.Utility.alertDialog(error.message);
}
);
}