Options for locking field on Business Process Flow

Requirement
Field should be locked on the form as well as on the business process flow.
lock

Details
Sometimes we need to make field read only on the business process flow. Let’s see what options we have to make field read only on entity forms.

Using Field Behavior
This is the first and the easiest way of making field read only. When you select this option, your field will be read only by default.

readonly1
If require we can write scripting to unlock it based on the condition. But while using this option if some field is available on the form and BPF (Business Process Flow) it does not make field read only in the BPF.

Using Scripting
This is another option which we can use to make field read only on the form as well as on the BPF. but you need to write different code for the field on the form and for the field on the BPF, like in below screen we have same field in both places and we have used different code to make them read only.
readonly2

Business Rule
Another option to make field read only using business rule, we can create business rule based on the condition if any and it will make field read only in both the places. While creating business rule we have to use some condition first after that we can use some action, for example let’s say we have field which we are calculating through code and want to keep this field read only always. We can put condition to check owner field value, if owner field contains data, we can use action to lock field.

Summary
This is how we can use different options to make field read only on the form as well as BPF, we can use any option based on requirement.

Hope it will help someone !!
Keep learning and Keep Sharing !!

Leave a Reply

Your email address will not be published. Required fields are marked *