New answers tagged

2

What you need to do is make sure that you don't attempt to access the approvals list (queryResult) before you actually have it. approvals[0].Id will cause an error, because there is no approvals[0] - so when you attempt to access the Id property of nothing, it causes an error. You will always need to wait for the result, but while you are waiting, you should ...


0

You simply need to add an action support: <apex:inputField value="{!c.AccountId}"> <apex:actionSupport onchange="{!updateAccount}" /> </apex:inputField> ... public void updateAccount() { if(c.AccountId != null) { acc = [SELECT ShippingAddress, ShippingStreet FROM Account WHERE Id = :c.AccountId]; } ...


Top 50 recent answers are included