web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

Disable/Enable fields after creation with no code

Charles Abi Khirs Profile Picture Charles Abi Khirs 3,569

The last day, I had a task that requires to disable some fields on the form after the record is created.

As a developer, you might directly thought in JavaScript; but, there is an easier and faster way to do it with no code neededBusiness Rules.

1. Go to the specific entity and create a new business rule

2. In the Condition element, choose a field that it will always be filled once the record is created (created on, modified on...)

3. Add the condition if the chosen field Does Not Contain Data => record not yet created (Modified On Does not contain data, Create On Does not contain data...)

4. In the True part of the condition, add the Lock/Unlock element for the field you want to Enable and repeat it to all the necessary fields

5. In the False part of the condition, add the Lock/Unlock element for the same fields and choose to Disable the necessary fields

6. Set the rule scope to All Forms and Activate it

That's it!

When you click New button, you will be able to enter the fields



After the record is created, the fields will be locked and you will not be able to modify them


Bonus Tips:

1. You can choose built-in fields as well as custom fields. Personally, I prefer built-in field such as Created OnModified On...

2. Make sure that all fields that are used in the Business Rule are placed on the form

3. To speed up the business rule creation, you can copy/paste the components as detailed in my previous post


Hope this Helps!


This was originally posted here.

Comments

*This post is locked for comments