public String getAccountId(){
Quo = apexpages.currentpage().getParameters().get('id');
Opportunity Opp = [SELECT Account__c FROM Opportunity Where SyncedQuoteId =:Quo];
AccountId = Opp.Account__c;
return AccountID;
but getting the following error:
System.TypeException: Invalid conversion from runtime type SOBJECT:Quote to SOBJECT:Account Class.YTDAccountEXT.
I am trying this:
but getting the following error:
System.TypeException: Invalid conversion from runtime type SOBJECT:Quote to SOBJECT:Account
Class.YTDAccountEXT.
Please help
There are variables in your posted code that are instanciated elsewhere. Can you post your full code?
-Andy
Can someone please tell me how I can get the Account ID from the Quote object??
Id idOpportunity = <if you're in the Quote controller, you can access this Id from the Quote record>
Opportunity opp = [SELECT AccountId FROM Opportunity WHERE Id = :idOpportunity];
Id idAccount = opp.AccountId;