You need to sign in to do that
Don't have an account?
how to get account data when you have opportunity
Dim qr As apex.QueryResult = binding.query("Select Name, StageName, ProjectID__c, ID,EngagementStartDate__c, Entity_1__c, owner.name, owner.email, Property_Address__c,Property_City__c,Property_State__c, Property_ZIP_Postal_Code__c,Building_Footprint__c,Partial__c,Number_of_Stories_del__c,Number_of_Buildings__c,Acquisition_Date__c,Construction_1_Date__c,Site_Plans__c,Rent_Roll_Available__c, CloseDate, Client_Req_Comp_Date__c, Amount,Existing_Building_Plans__c,Soft_Cost_Details__c, Depreciation_Schedules__c, Payment_Applications_G702_703__c, Construction_Invoices__c,Construction_1__c,Acquisition__c, Soft_Costs__c, Improvements__c, Land_Cost__c, Comments__c, Portfolio_Name__c, X3115_Report__c, X3115_Fee__c, Property_Size__c, Referral_Name__c, Referral_Fee_Percentage__c, Referral_Amount__c, Property_Types__c from Opportunity Where ID = '" & lbOpportunities.SelectedValue & "'")
The above code works just fine, when I try to add "Acccount" in order to get data to create an account object I get the following error:
No such column 'Account' on entity 'Opportunity'.
Any ideas?
You can't just ask for the Account object, you have to ask for the fields on the Account you care about. So for Opportunity, you could do something like:
select id, account.name, account.description from opportunity
See the section on relationships in our API docs.