function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brett Roberts 15Brett Roberts 15 

Formula Field - Account Owners

I need to create a custom formula field on the account that evaluates the owner ID of an account and then fills a field out with a text value (a name).

Here is the breakdown I need.

Owner ID 1 = Name 1
Owner ID 2 & 3 = Name 2
Owner ID 3 & 4 = Name 3

Any ideas?
Best Answer chosen by Brett Roberts 15
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Brett,

Thanks for confirming. Can you try thr below formula. Replace the ownerids as per your requirement.
 
if( OwnerId ='0055j000000XLmV', 'sample1' , if( OR(OwnerId ='0055j000000XERR',OwnerId ='0055j000000XERT'),'SAMPLE2', IF(OwnerId='0055j000000Xfs4', 'SAMPLE3','')

)

)

If this solution helps, Please mark it as best answer.

Thanks,
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Brett,

In the above question you mentioned OWNER ID 2 &3 . At a given instance owner id can be only one.  Can you clarify this.

Thanks,
 
Brett Roberts 15Brett Roberts 15
I meant to write Owner ID is 2 OR 3. Thanks, Brett
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Brett,

Thanks for confirming. and onf final question is only the name should be assigned for 1,2,3,4 ownerids . Remaining records the value can be Blank right?

Thanks.
 
Brett Roberts 15Brett Roberts 15
That’s correct. Thanks, Brett
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Brett,

Thanks for confirming. Can you try thr below formula. Replace the ownerids as per your requirement.
 
if( OwnerId ='0055j000000XLmV', 'sample1' , if( OR(OwnerId ='0055j000000XERR',OwnerId ='0055j000000XERT'),'SAMPLE2', IF(OwnerId='0055j000000Xfs4', 'SAMPLE3','')

)

)

If this solution helps, Please mark it as best answer.

Thanks,
 
This was selected as the best answer
Brett Roberts 15Brett Roberts 15
That worked perfectly! Thank you!
xcvx dfxcxcvx dfxc

I found the "Discover Lightning Actions Trailhead Challenge" to be an exciting and educational experience. It helped me enhance my knowledge of Lightning Actions and their implementation in Salesforce. As someone interested in exploring new apps, like proluluboxapk (https://proluluboxapk.com/), this challenge provided valuable insights into leveraging Lightning Actions effectively. Thanks for the insightful content!
Max MomaMax Moma
I am a passionate food enthusiast with a deep love for food-related photography. My journey in photography has been a delightful exploration of culinary experiences and visual storytelling. Food, with its rich textures, vibrant colors, and intricate details, has always captivated me. Through my lens, I aim to capture the essence of each dish, highlighting its unique appeal and inviting viewers to savor the moment.
One of my favorite subjects to photograph is the breakfast menu at Hardee's, a place where I've embarked on culinary adventures at various locations. The early morning light and the scrumptious offerings on Hardee's breakfast menu (https://theopeninghour.com/hardees-breakfast-hours/) provide an ideal canvas for my photography. From the perfectly charbroiled Thickburgers to the mouthwatering biscuits and gravy, each dish tells a delicious story. I strive to showcase the artistry in food preparation, and my goal is to transport viewers to a world where they can almost taste and smell the flavors through my photographs.
Photography isn't just a hobby for me; it's a way of connecting people with their culinary desires. My portfolio reflects my commitment to capturing the beauty and deliciousness of food (https://theopeninghour.com/homewood-suites-breakfast-hours/), making each image an invitation to explore the world of flavors. Whether it's a simple breakfast platter or an elaborate gourmet dish, I believe that food photography has the power to evoke emotions, spark cravings, and celebrate the artistry behind every meal.