• Tejasvi Rao 4
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello everyone,

I need help on writing a trigger. The requirement is to update a field named 'Account Status' on Account on basis of 3 of its child objects activites.

The 3 child objects of Account and its relationship with account :

Finance (custom obj) : look up relationship
Opportunities : Master-Detail relationship
Calls (Custom obj) : look up relationship

So, the requirement is to first check if Account has any Finance records associated with it. If Yes, then check if there are any opportunities linked to it. If the account has any opportunities linked to it, then check if any of its oppportunities were not modified in the last one year. 

If there any opportunities not modified in last one year, then check if the account has any call record created in last one year again.

If the above criteria meets, then the account status field on account should read "disengaged" else should read "engaged".

Can someone help me on this?

Many Thanks,
Tejasvi
 

Hello everyone,

I need help on writing a trigger. The requirement is to update a field named 'Account Status' on Account on basis of 3 of its child objects activites.

The 3 child objects of Account and its relationship with account :

Finance (custom obj) : look up relationship
Opportunities : Master-Detail relationship
Calls (Custom obj) : look up relationship

So, the requirement is to first check if Account has any Finance records associated with it. If Yes, then check if there are any opportunities linked to it. If the account has any opportunities linked to it, then check if any of its oppportunities were not modified in the last one year. 

If there any opportunities not modified in last one year, then check if the account has any call record created in last one year again.

If the above criteria meets, then the account status field on account should read "disengaged" else should read "engaged".

Can someone help me on this?

Many Thanks,
Tejasvi