I am trying to pass DateTime parameter to global custom action using javascript. with no success. What is right way.
I have tried "typeName": "Edm.DateTime" and "Edm.DateTimeOffset" also tried "typeName": "Edm.String" (date formatted using javascript function .toJason() )
Code looks like following
act_testAction = function ( startDate) {
this.StartDate = startDate;
this.getMetadata = function () {
return {
boundParamter: null,
parameterTypes: {
"StartDate": {
"typeName": "Edm.DateTime",
"structuralProperty": 1
}
},
operationType: 0, // 0 for action, 1 for function and 2 for CRUD
operationName: "act_test"
};
};
let requestObject = new act_testAction( sdate);
return await Xrm.WebApi.online.execute(requestObject);