• Mike K
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Salesforce Engineer
  • First Republic Bank


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi ,

Can some one help me to write a trigger to prevent delete of all Account records and its supporting test class.
Doesn't matter who the user is (Sys Admin/Custom Profile/Read Only...etc), the user should not be able to delete the account record.
There cannot be any exception.

Any help is appreciate.
Thanks!
A
I am tyring to build a process that will count the number of opportunities in a particular stage and based upon results will determine with picklist value on the account page will have.  Example
Opportunity Status is set to Status 1.  update Opportunity 2 to a higher status, it would change the account picklist value.  If that same opportunity were to be lost it would then lower the account field.  Then if the 1st opportunity also loses it would then change the account picklist field again.  Basisally which ever has the highest opportunity status between creating opportunity, higher statuses or lost would determine with value it is.  

Any thoughts. 
Hi ,

Can some one help me to write a trigger to prevent delete of all Account records and its supporting test class.
Doesn't matter who the user is (Sys Admin/Custom Profile/Read Only...etc), the user should not be able to delete the account record.
There cannot be any exception.

Any help is appreciate.
Thanks!
A
I have performed a fast lookup and retrieved a list of objects. I need to make a decision based on the number of records returned - can I do this with a formula instead of having to use a loop to count the records?