+ Start a Discussion
LALALALALALA 

look up field question

Hi, Please help me.

In opportunity object have a look up field which name is Account Name, but when I use trriger to automatically create opportunity, I can't find any parameter can represent Account Name this field or any API can represent Account Name look up field??  Thanks

 
Nitin PaliwalNitin Paliwal
Hi,
The field API name for the account in the Opportunity Object is "AccountId" .
Try "AccountId" to fill the account lookup in the trigger.

Hope this solves your problem.

Thanks
Nitin
Mudasir WaniMudasir Wani
Hello,

There should be one field with the name AccountId.
This is the field which is referenceTo  account.

Let me know if you have any issue.
Thanks,
Mudasir
mudasir.salesforce@gmail.com
Mudasir WaniMudasir Wani
If you want to access the name of the account you can use the below code. "Account.Name" 
For your understanding I have pasted a query which may help you 
SELECT AccountId,Account.Name FROM Opportunity limit 1

Don't forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can helpn