RecalculatePrice Action
This action is used to trigger out of the box price calculation for Opportunity, Quote, Sales Order or Invoice entities. This action is applicable for both server and client invocations.
License and role requirements
Requirement type | You must have |
---|---|
License | Dynamics 365 Sales Premium or Dynamics 365 Sales Enterprise More information: Dynamics 365 Sales pricing |
Security roles | System customizer More information: Predefined security roles for Sales |
Parameters
Name | Type | Required | Description |
---|---|---|---|
entityLogicalName | String | Yes | Entity logical name |
entityId | GUID | Yes | Entity GUID |
Examples
Server Invocation
Request
POST [Organization URI]/api/data/v9.1/RecalculatePrice
{
"entityLogicalName": "quote",
"entityId":"91F3EDB0-213B-E911-8190-000D3AFD8945"
}
Response
HTTP/1.1 204 No Content
OData-Version: 4.0
Client Invocation
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);
}
);
}
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기