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
LisaSturzLisaSturz 

Trigger to set default value

Is there a way to use a trigger to set the default value of a date field on a custom object based on the value of another field on the page?

hpereirahpereira
Hello, You can do it, if that other field on the page is also recorded into the database. Triggers run directly on database. So you cannot use values of fields on screen, but of course you can get the value if it has been recorded on the database.