function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Robert AderoRobert Adero 

Enable a field to be editable

I have a formula field on Record A that updates field 1 from  Record B but I would like it to also include a formula that will enable field 1 (or additional field lets say field 2) on Record A to be active and editable when Null Value is shown
YuchenYuchen
If you define the field 1 as formula I do not think you can make it editable on certain condition. Maybe you can define the field as Text or whatever type you want, then use Trigger to control the logic. So in the Trigger:
- When the value is NOT NULL, take the value from Record B and put in Record A.
- When the value is NULL, allow edit (do not throw error).
- If user tries to edit field 1 directly, throw error.
 
Robert AderoRobert Adero

Thanks for the response......What if I define field 1 as a picklist and when Null is selected then Field 2 (a picklist also)  becomes active/editable .......will that work?

YuchenYuchen
Yes I think you can achieve the above logic in the Trigger and use different if loop to control the logic. 

If field 1 and field 2 are both on the same Object, then probably you can use depedent picklist in Salesforce to control the logic, then no code needed. In the dependent picklist, you can define that only when field 1 is "Null" (or a default value "N/A") then make field 2 active, otherwise no picklist value available for field 2.