+ Start a Discussion
HeeseHeese 

Need help writing a trigger

Can someone point me in the right direction for writing a trigger that updates a field on the Account Record if a contract is expired?  

 

For instance if a contract is current (start and end date are within current date) it would update the field to say current.  If the contract end date is a date in the past and there are no other current contracts it would update the field to "lapsed"

 

Thanks in advance 

arunkarunk

Hi,

 

 

Dont you mean  update a field to current when current date is within start and end dates :)

Anyways, are start, end dates fields of contact? Custom fields ?

You can only apply triggers to events like when a contact is created/updates/deleted.

You cannot schedule a trigger.

 

 

Regerds,

Arun

HeeseHeese

Hi Arunk ,

 

Contract Start and End Date are standard fields in the contract object 

PragadheeshwariPragadheeshwari

we can schedule a trigger by using time trigger

HeeseHeese

Hi Pragadheeshwari,

 

Do you know of any example anywhere?  I'm very new to triggers.  Thanks