Notifications
Announcements
No record found.
OnSave
OnClose
function setActivityStatusOnSave(executionContext) { var eventArgs = executionContext.getEventArgs(); // Check if Save & Close (save mode 70) if (eventArgs.getSaveMode() === 70) { var formContext = executionContext.getFormContext(); // Set Status Reason to 'Completed' (value depends on entity) formContext.getAttribute("statuscode").setValue(Completed_Status_Code); // e.g., 2 for Email // Set State to 'Completed' (1) formContext.getAttribute("statecode").setValue(1); } }
Replace Completed_Status_Code with the actual value for “Completed” in your activity (e.g., for Email it's 2). Register Script: Event: OnSave Function: setActivityStatusOnSave Scope: Form Check “Pass execution context” This ensures the status is updated before the form is closed.
Replace Completed_Status_Code with the actual value for “Completed” in your activity (e.g., for Email it's 2).
Completed_Status_Code
2
setActivityStatusOnSave
This ensures the status is updated before the form is closed.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 170 Super User 2025 Season 2
#ManoVerse 61
Gerardo Rentería Ga... 52 Most Valuable Professional