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
mdelgadomdelgado 

Marking a field required....impact on an existing trigger

Hello,

 

I have a trigger that currently generates a task after a project (my custom module) is updated.

 

I want to change the task layout to require the "relates to" field.  If I make this change in the salesforce GUI, am I required to add the "relates to" field to my trigger?  Will the trigger be able to create the task even though a required field is missing?

 

thanks,

 

Mirko

Best Answer chosen by Admin (Salesforce Developers) 
mdelgadomdelgado

Hi Mike,

 

Currently the field is not required, hence it is not being populated/included in the trigger.

 

If I make the field required (relates to field) from the salesforce GUI.....will my trigger still work?

 

thanks,

 

Mirko

All Answers

MikeGillMikeGill

I don't think you need to. You are progamatically creating the task anyway from your Project (custom object) I presume and therefore always populating the field - is that correct?

 

 

mdelgadomdelgado

Hi Mike,

 

Currently the field is not required, hence it is not being populated/included in the trigger.

 

If I make the field required (relates to field) from the salesforce GUI.....will my trigger still work?

 

thanks,

 

Mirko

This was selected as the best answer