I want to change the status reason from "Not started" to "In progress" using Java script code
I want to change the status reason from "Not started" to "In progress" using Java script code
learn.microsoft.com/.../updaterecord
This post contains everything you need. Good luck.
Can you update my code with update record method
Can you update my code with update record method
For your second part that doesn't work you will have to update statecode and statuscode the same time and I believe you will be able to do that using Xrm.WebApi.updateRecord
Hi,
async function serviceActivityOnLoad(executionContext)
}
That is my code all the code works but in if condition the logic is failing to set statuscode to 6. while I am trying with setStatus(2) ( where 2 means requested ) it is working. But for 6 it is not working 6 means Inprogress which is from Scheduled, while Not started is from Open
Then create a webresource, add it to the form and add OnLoad event handler pointing to changeStatusCode. Don't forget to check "Pass Execution Context" checkbox.
Check this - debajmecrm.com/.../
I have to change that on formonload event
Hello,
I'm not sure what's the trigger for your code but here is how it should approximately look like:
function changeStatusCode(executionContext){
var formContext = executionContext.getFormContext();
formContext.getAttribute("statuscode").setValue(<replace this with In Progress value>);
}
André Arnaud de Cal... 291,431 Super User 2024 Season 2
Martin Dráb 230,503 Most Valuable Professional
nmaenpaa 101,156