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
SFDC coderSFDC coder 

can't access account.name from opportunity

I have created a workflow on opportunity 
enrty criteria: Opportunity.name not equal to null
evaluation criteria:every time its created and edited
worflow action:field update on opportunity name
value to be set is: Recordtype.name&" " &Account.name

Problem is after the workflow fires,the opportunity name is populated with only the recordtype.name and account name seems to be blank..
is it that we can't access the account.name through opportunity in a workflow formula field?


Best Answer chosen by SFDC coder
SFDC coderSFDC coder
thans for your replies...

i have got the solution...the thing is that it was person account so it was not getting populated directly

All Answers

Pablo_RoldanPablo_Roldan
Hi,

I think that I'm really wrong, but have you tried to use Opportunity.Account.Name instead of Account.Name?

Hopefully that works.
Pablo.
SFDC coderSFDC coder
hi,

i jus tried your suggestion but its not working out
Pablo_RoldanPablo_Roldan
Hi Neha,

I have reproduced your case. However I have use AccountId instead of Recordtype.name. Also the value to set which I have use was the following:
Account.Name +' '+ AccountId
And this works for me.

Thanks,
Pablo.
RajKumaR MRajKumaR M
Evaluation Criteria  - Evaluate the rule when a record is: created, and every time it’s edited.

Rule Criteria (Filter)   -  Opportunity: Created Datenot equal to null

Immediate Actions  Field Update: Set opportunity name to the following formula:  -  Account.Name &"   "&$Recordtype.Name

Try with this, hope it helps...

http://help.salesforce.com/HTViewHelpDoc?id=workflow_examples.htm&language=en_US#SettingDefaultOpp (http://help.salesforce.com/HTViewHelpDoc?id=workflow_examples.htm&language=en_US#SettingDefaultOpp)
Pablo_RoldanPablo_Roldan
Please click on Best Answer to make this question solved for anyone in the future if your problem has been solved.

Thanks,
Pablo.
SFDC coderSFDC coder
thans for your replies...

i have got the solution...the thing is that it was person account so it was not getting populated directly
This was selected as the best answer