使用Process.js进行呼叫操作-CRM [英] Call action using Process.js - CRM
问题描述
我已经进行了自定义工作流程活动,已使用插件注册工具进行了注册,现在我想使用Action执行它。动作将没有输入/输出参数。唯一名称为 ad_opportunity
。这将从自定义实体 ad_productsamplerequest
I have made custom workflow activity, registered it with Plugin Registration Tool and now i want to execute it using Action. Action wont have input/output parameters. Unique name is ad_opportunity
. It will be executed from Custom Entity ad_productsamplerequest
执行。我将使用Process.js从JavaScript调用此操作。
I will call this action from JavaScript using Process.js.
我不熟悉Process.js,因此在调用Action时遇到问题。
I am not familiar with Process.js, so I have a problem to make Action call.
这里是我拨打的电话,但没有用。我在这里错过了什么吗?
Here is the call I made, but it doesn't work. Am I missing something here:
Process.callAction("ad_opportunity",
[{
key: "Target",
type: Process.Type.EntityReference,
value: { id: Xrm.Page.data.entity.getId(), entityType: "ad_productsamplerequest" }
}],
function (params) {
//Success
},
function (e) {
// Error
alert(e);
}
);
推荐答案
代码中提到的值应声明为EntityReference。
Value mentioned in your code should be declared as EntityReference. Please refer below code for same
Process.callAction("mag_Retrieve",
[{
key: "Target",
type: Process.Type.EntityReference,
value: new Process.EntityReference("account", Xrm.Page.data.entity.getId())
},
{
key: "ColumnSet",
type: Process.Type.String,
value: "name, statuscode"
}],
function (params) {
// Success
},
function (e, t) {
// Error
});
休息看起来不错
这篇关于使用Process.js进行呼叫操作-CRM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!