+ Start a Discussion

How to get null record using Triggers?

Hi Guys,

I would like to add record to object B using trigger, this trigger should only add record to B if record A fieldnumber is null/blank, how can we do that?

If(account.fieldnumber == null/blank/empty)

Best Answer chosen by Newbie_edm
Ray C. KaoRay C. Kao
Yes, the code is like ...

if(recordA.fieldnumber == null) {
  create object B's record...

But, you might need to query recordA before you can identify if recordA's information is meet or not meet your criteria to run.

And, since it is a trigger, what is the event to trigger the process? And, also what is the relationship between A and B?