Hello every one,
I tried to call action plugin by using Process.js libraray,
i am able to pass input parameter to my plugin using action.
But unable to get the output paramter.
this is my javascript code
// JavaScript source code
function callAction() {
debugger;
var formId = null;
formId = Xrm.Page.data.entity.getId();
Process.callAction("custom_TestProcess",
[{key: "input", type: Process.Type.String, value: formId}],
function (params) {
// Success
var outputParamOne = params["output"];
alert("Here " + outputParamOne);
},
function (e, t) {
// Error
alert(e);
// Write the trace log to the dev console
if (window.console && console.error) {
console.error(e + "\n" + t);
}
});
}
and this my c# code
try
{
// Entity entity = (Entity)context.InputParameters["Target"];
string purchaseRequestId =(string) context.InputParameters["input"];
// throw new InvalidPluginExecutionException("Here we are");
if (purchaseRequestId == null || purchaseRequestId == "") return;
context.OutputParameters["ouput"] = "test";
}
i have verified the name of input and output parameters are same in all places and plugin in post operation but output parameter in js shows null.