I have a locked record. This record has an active wf-handling. This wf-handling have to unlock the record before launching the status-page, because this status-page have som editable fields. But how can i unlock the record before launcing the status-page? I don't have a trigger "before" this wf-handling.
Hello,
Locked record is not supposed to have any handling. Please use server-side: set field API to remove lock
Hope this helps.
We can unlock record before launching status page using browser/client side API.
Steps:
-> Go to Object Definition page and click on Buttons tab and Click on New Button.
-> Provide value for 'Display Label' field and select 'Run client-side JavaScript' radio button.
-> Provide following code to Button Script text area.
rbf_setField("teammember", {!id}, "isLocked", false, false);
-> Select All pages checkbox inorder to show this button in every page and Save it.
-> Goto Status/View page of locked record. The newly created button would be available there. Click on that button.
-> Refresh the page.
Note: setField() method will update the value in backend but it takes time to update the UI presentation.( This point is documented). So, we need refresh here.
-> Observe that record is getting unlocked. Then, we can update fields along with status change.
Hello,
Locked record is not supposed to have any handling. Please use server-side: set field API to remove lock
Hope this helps.
The server-side API set field is used (in a wf-handling) but I can't find a way to unlock before i start the wf-handling.
I should have been like this in one wf-handling:
- unlock record
- start wf-handling with status-page
I have to use two wf-handling and this give the user the possibility to only start the unlock.
The record will then be in an error-state.
We can unlock record before launching status page using browser/client side API.
Steps:
-> Go to Object Definition page and click on Buttons tab and Click on New Button.
-> Provide value for 'Display Label' field and select 'Run client-side JavaScript' radio button.
-> Provide following code to Button Script text area.
rbf_setField("teammember", {!id}, "isLocked", false, false);
-> Select All pages checkbox inorder to show this button in every page and Save it.
-> Goto Status/View page of locked record. The newly created button would be available there. Click on that button.
-> Refresh the page.
Note: setField() method will update the value in backend but it takes time to update the UI presentation.( This point is documented). So, we need refresh here.
-> Observe that record is getting unlocked. Then, we can update fields along with status change.
This is OK, but then the user have to click two times to get one action. Ex:
- Unlock record (Ex. your example)
- Start Workflow-handling with launching a (Status)-page
If we could get a "Trigger before" when defining workflow-actions, we could have this done in one user-handling:
- Start Workflow-handling with this included::
1) Run "Trigger before" defined - Unlock Record
2) Lanuch status-page defined
3) Run "Trigger After" defines --> Ex. Lock record.
We do miss the opportunity to define "Triggers Before", but we have the opportunity to define "Triggers After".
I will put this in the "Ideas"