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
Mikey999Mikey999 

Copy field from Account to Opportunity (is a picklist)

I am not sure how to write this formula field (I am very new to this).  I have a field on the Acccount that is called National_Account_Status__c, this is a picklist with the following options:  None, Targeted, Current.  I need to just make an easy formula field to copy this field and the value over to the Opportunity.  What I did was create a field forumal named it and put int the formula Account.National_Account_Status__c, seems easy.  However I get the error that it is a picklist and I need to us ispickval.  I have used this in a formula field before but it was to calculate something.  I am not sure how to use it here.  

 

Again all I need is to copy this field over to the Opp.  One question though, if I create a new field with this formula field, will this work on Opporutnities that are already created or just new Opps? 

 

Thank you very much!

Best Answer chosen by Admin (Salesforce Developers) 
KT1KT1
You do not need the workflow rule. If you just create a Formula field, like I said before, it will update whenever the other field updates. Because it is a formula field it is always calculating.

All Answers

ronycronyc

Hi,

 

Please follow the steps below:

1. create a text field in Oppty where u want to store the picklist value from Account.

2. Create a workflow rule on opportunity where rule criteria is formula evaluaes to  true and put value as TRUE .

3. Click Save and next.

4. Add a work flow action as Field update and give some name, select the object as opportunity and field the one which u created where the value should be copied.

5. under specify new field value select use formula option.

6. Put the formula as VALUE(Account.National_Account_Status__c).

Save it and actvate the work flow rule once done.

Check by creating the a new record.

ronycronyc

please accept this is answer incase if this works and please give kudos

Mikey999Mikey999

The problem with all these solutions is that I keep getting this error (this one is on the workflow).

 

Field National_Account_Status__c is a picklist field. Picklist fields are only supported in certain functions.

KT1KT1
Whast you would be creating is a Cross object formula. You would create a Formula Field on Opportunity and the Formula would be TEXT(National_Account_Status__c), that will display the text version of the account field. Please let me know if this does not work. If it does work please add it as a solution.
ronycronyc

Hi Mikki,

 

update the below formula in the work flow rule i told u before

 

Instead of VALUE(Account.National........)

 

now put it as TEXT(Account.National_Account_Status__c)

 

This should work now.

Mikey999Mikey999

That does work.. Thank you, however, I do have one problem, when the Opp is edited and the National Account Status changes it does not get updated on the Opp.

ronycronyc

Hi Mikki,

 

Select the second rule criteria i.e Whenever a record is created or updated. and this will work fine.

 

Also please accept this as answer is this helped you and if possible kudos :)

KT1KT1
You do not need the workflow rule. If you just create a Formula field, like I said before, it will update whenever the other field updates. Because it is a formula field it is always calculating.
This was selected as the best answer
Mikey999Mikey999

Awesome worked with the TEXT field.

Surendra P 18Surendra P 18
Hi Mikey,

Its been years, can you please help me out with same senerio as when I try to create an formula feild on Oppurtunity, cant find account feilds to Insert.

Thanks!