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
Shubham SengarShubham Sengar 

how to create unique custom long text field in salesforce

how to create unique custom long text field in salesforce by trigger.?
LBKLBK
You want to CREATE a field from a Trigger?

I believe a trigger can only manipulate data in a field, not create a field itself.
@GM@GM
if there is long text field created in SFDC then add a trigger to check newly created value with existing value in order to make sure its unique.
using .addError method you can avoid record creation with duplicate values for long text field.

Appending AUTONUMBER or any other unique fields to this long text via before trigger will leads to uniqueness.