If the user unchecks the inactive button and click...
# suitescript
s
If the user unchecks the inactive button and clicks 'Submit Button' vendor record is getting activated. Is there any config/script reference available to stop users from saving the record using this method.
e
User Event on the Vendor record monitoring the
XEDIT
event type during a
beforeSubmit
entry point.
💯 2
s
XEDIT works if the “Edit” slider is turned on on list view, otherwise the “Show Inactives” checkbox still populates and lets you activate the record . In our case user are checking the 'Show Inactive' checkbox -> Uncheck Inactive -> Click Submit , this event is not getting logged in the User Event (neither Xedit nor edit ) and allowing the record to save.
Use case is : We have a workflow that automatically inactivates Vendor records until they are approved by the designated User Role. This ensures that unapproved Vendor records are not used in transactions. However, users can still activate these records by selecting the 'Show Inactives' checkbox on the Vendor list and ticking the checkbox next to the unapproved record.
e
Time to coach your users.
s
So no workaround for this ?
z
Just an idea: • user event script on ALL event type except Create • check old and new values for InAcitve • if InActive goes from T to F and role is not one allowed to change, set back to T
s
@Zoran R-DATAGRAM: User event is not getting triggered when we uncheck Inactive checkbox and click submit from the list view
z
@Sitaram upadhya Sorry, I missed your previous comment, that UE or WorkFlow are not triggered by this action. I tried to make a quick test with WorkFlow and unfortunately, you are correct… But that means you don’t have any solution for this…
s
Right, maybe I need to go with @erictgrubaugh’s advice
😁 1
z
and what about Role’s permission? Set to VIEW, not EDIT/FULL
s
Role is set to EDIT/FULL because these user's are responsible to edit/create the vendor record. Only thing is since we got this scenario while our testing phase we were looking for any workaround to restrict the users from doing this action.
z
If you don’t need real-time prevention, try using a custom field “APPROVED”. Set the value to FALSE inside you workflow where you force InActive. Next step is scheduled workflow that force InActive status = T when “Approved” = FALSE Make the custom field “Approved” to read=only on every custom form for Vendor record except to ROLE with “activating” permission
Complicated, yes … But you don’t have any other option