You need to sign in to do that
Don't have an account?
Rajat Bhatt 4
How to retrieve account name from id using SOQL
Hi, I am new to salesforce and i am facing a problem in retrieving an account name.
I have a String which contains the account id , and i want to fetch the account name using SOQL so that i can store it in the field?
Thanks in advance.
I have a String which contains the account id , and i want to fetch the account name using SOQL so that i can store it in the field?
Thanks in advance.
Account acc = [Select Id ,Name from Account where id=:yourIDString ]
Or
Account acc = [Select Id ,Name from Account where id='record id '] ;
All Answers
Account acc = [Select Id ,Name from Account where id=:yourIDString ]
Or
Account acc = [Select Id ,Name from Account where id='record id '] ;