Open Main View from the JavaScript
var pageInput = {
pageType: "entitylist",
entityName: "dag_wfacompositeentity"
};
Xrm.Navigation.navigateTo(pageInput).then(
function success() {
// Run code on success
},
function error() {
// Handle errors
}
);
setTimeout(function refreshPage() {
Xrm.Utility.openEntityForm(formContext.data.entity.getEntityName(), formContext.data.entity.getId());
}, 10000);
var flowUrl = "https://prod-85.westeurope.logic.azure.com:443/workflows/7174dc80ca8745e9a52a459129642f7c/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=PRK-k8dNT-w_wtt22xnm-6RB6w7AJUsHRls6iZq-xUU";
var input = JSON.stringify({
"TrackingId": _TrackingId,
"Comment": _comment,
"TargetUser": _TargetUser,
"RunAsUser": _RunAsUser,
"Outcome": "Approve",
"EntityId": _EntityId
});
var req = new XMLHttpRequest();
req.open("POST", flowUrl, true);
req.setRequestHeader('Content-Type', 'application/json');
Comments
Post a Comment