• Emily Petersen 13
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 2
    Replies
I need assistance writing APEX code to update the Account Owner based on the following:

Create workflow or process builder to change account owner once "commission end date" (Commission_End_Date__c) has passed. (I've already started the Process Builder, just need to add in the APEX code as the Action)
- If Account Strategist (Account_Strategist__c)(picklist field) is on an account, they are made the account owner. 
- If only a Media Strategist (Media_Strategist__c)(picklist field) is on an account, they are made the account owner. 
- If no Media Strategist or Account Strategist, Client Success (user) are made the account owner. 

I'm assuming I need to make some sort of map that has all of the names and their corresponding Contact IDs. I have the schematics in my mind, I just don't know how to follow through. Any help would be greatly appreciated!!

Best, 
Emily
I need assistance writing APEX code to update the Account Owner based on the following:

Create workflow or process builder to change account owner once "commission end date" (Commission_End_Date__c) has passed. (I've already started the Process Builder, just need to add in the APEX code as the Action)
- If Account Strategist (Account_Strategist__c)(picklist field) is on an account, they are made the account owner. 
- If only a Media Strategist (Media_Strategist__c)(picklist field) is on an account, they are made the account owner. 
- If no Media Strategist or Account Strategist, Client Success (user) are made the account owner. 

I'm assuming I need to make some sort of map that has all of the names and their corresponding Contact IDs. I have the schematics in my mind, I just don't know how to follow through. Any help would be greatly appreciated!!

Best, 
Emily

Look at my stage picklist values below.  I only want a sales user profile to be able to choose the first two values.  Our order administration team should be the only profile able to choose 3. Confirmed Deposit.

 

Any way I can do this with a validation rule?

 

Stage

1. Interested

2. Pending

3. Confirmed Deposit