You need to sign in to do that
Don't have an account?
faceroy123
Visualforce - Render a lookup field on quick save
Hi,
I have the page below, which upon 'save & edit' I want to display the accountid lookup field.
At the moment the lookup field is not displaying when I rerender the page using the quick save (save & edit) button in the page.
Also, is there a way to show this field only if the string of the account number begins with '700'?
i.e. the accountid only needs to show if the account number starts with '700'.
Thanks
<apex:page standardController="Case"> <apex:form > <apex:pageBlock title="Rich Contact Details"> <apex:pageBlockButtons location="bottom"> <apex:commandButton action="{!QuickSave}" value="Save & Edit" rerender="theFields,theCode" oncomplete="RefreshText();"/> <apex:commandButton action="{!Save}" value="Save & Close"/> </apex:pageBlockButtons> <apex:outputPanel layout="none" id="theFields"> <apex:pageMessages /> <apex:pageBlockSection > <apex:inputField value="{!Case.subject}"/> <apex:inputField value="{!Case.casenumber}"/> </apex:pageBlockSection> </apex:outputPanel> <apex:outputPanel layout="none" id="theCode" > <apex:inputField value="{!case.accountid}" required="true" rendered="{!if(case.Account_Number__c!=null, TRUE, FALSE)}"> </apex:inputField> </apex:outputPanel> <apex:pageBlockSection columns="1"> <apex:inputField value="{!Case.Account_Number__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>