Tuesday, June 4, 2019

How to ensure that Role has been selected when creating a Contact record?

When creating a Contact record for a Customer, Vendor, Partner or Other Name the Role is not mandatory and it cannot be set as such for the moment.
Enhancement 221662 has been raised to add the ability to make the Contact Role mandatory for users to ensure that each contact has role category selected before save.

Alternate Solution using Workflow:
Display a message on Save when Role has not been selected so that the user will not be able to move forward without selecting one.

Workflow: Contact Role
Basic Information: Record Type = Contact
Event Definition: On Create
Trigger Type = All

State 1: Check Role
Action 1: Return User Error
Trigger on = Before User Submit
Paramaters: Text = Please enter a Role for the Contact!

Condition: Custom Formula: nlapiGetFieldValue('contactrole') == ''

Another Solution would be to use a Client Script with Save Record function - details can be found in Answer How to ensure that a Role has been selected for Contact using SuiteScript.

No comments:

Post a Comment