+ Start a Discussion

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?

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.