You need to sign in to do that
Don't have an account?
Kyle Johnson 46
Visualforce Component Help
Hi all,
I am working on some code for a visual force component for our invoicing through FinancialForce. I am running into an issue with my code saying the following:
The only things I have changed in the code are the following lines from this:
To this:
I have added the following components to my object Invoice:
Agency Address:
And that is working fine as a custom object but to get it to reflect on the pdf invoice I did what is listed above.
Essentially what I want it to do is to first check if in the object of the invoice look to see if there is an agency. If there is not an agency list the account's address. If there is an agency List the agency address.
I am working on some code for a visual force component for our invoicing through FinancialForce. I am running into an issue with my code saying the following:
Error: Incorrect parameter type for function 'not()'. Expected Boolean, received Text
The only things I have changed in the code are the following lines from this:
<apex:outputText rendered="{!salesInvoice.c2g__Account__r.Name!=''}" escape="false"> {!salesInvoice.c2g__Account__r.Name}<br/> </apex:outputText> ATTN: <apex:outputText rendered="{!salesInvoice.Finance_Contact__c!=''}" escape="false"> {!salesInvoice.Finance_Contact__c}<br/> </apex:outputText> <apex:outputText rendered="{!salesInvoice.c2g__Account__r.BillingStreet!=''}" escape="false"> {!salesInvoice.c2g__Account__r.BillingStreet}<br/> </apex:outputText> <apex:outputText rendered="{!salesInvoice.c2g__Account__r.BillingCity!=''}" escape="false"> {!salesInvoice.c2g__Account__r.BillingCity} </apex:outputText> <apex:outputText rendered="{!salesInvoice.c2g__Account__r.BillingState!=''}" escape="false"> {!salesInvoice.c2g__Account__r.BillingState} </apex:outputText> <apex:outputText rendered="{!salesInvoice.c2g__Account__r.BillingPostalCode!=''}" escape="false"> {!salesInvoice.c2g__Account__r.BillingPostalCode} </apex:outputText> <apex:outputText rendered="{!salesInvoice.c2g__Account__r.BillingCountry!=''}" escape="false">{!salesInvoice.c2g__Account__r.BillingCountry}</apex:outputText>
To this:
<apex:outputText rendered="{!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingStreet!='',!salesInvoice.c2g__Account__r.Parent.BillingStreet!='')}" escape="false"> {!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingStreet!='',!salesInvoice.c2g__Account__r.Parent.BillingStreet!='')}<br/> <apex:outputText rendered="{!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingCity!='',!salesInvoice.c2g__Account__r.Parent.BillingCity!='')}" escape="false"> {!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingCity!='',!salesInvoice.c2g__Account__r.Parent.BillingCity!='')}<br/> <apex:outputText rendered="{!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingState!='',!salesInvoice.c2g__Account__r.Parent.BillingState!='')}" escape="false"> {!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingState!='',!salesInvoice.c2g__Account__r.Parent.BillingState!='')}<br/> <apex:outputText rendered="{!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingCountry!='',!salesInvoice.c2g__Account__r.Parent.BillingCountry!='')}" escape="false"> {!If(!salesInvoice.Agency__c=Null,!salesInvoice.c2g__Account__r.BillingCountry!='',!salesInvoice.c2g__Account__r.Parent.BillingCountry!='')}<br/>
I have added the following components to my object Invoice:
Agency Address:
if(Agency__c= NULL,c2g__Account__r.BillingStreet + ' ' + c2g__Account__r.BillingCity + ' ' + c2g__Account__r.BillingState + ' ' + c2g__Account__r.BillingPostalCode + ' ' + c2g__Account__r.BillingCountry,c2g__Account__r.Parent.BillingStreet+' '+c2g__Account__r.Parent.BillingCity+' '+c2g__Account__r.Parent.BillingState+' '+c2g__Account__r.Parent.BillingCountry)
And that is working fine as a custom object but to get it to reflect on the pdf invoice I did what is listed above.
Essentially what I want it to do is to first check if in the object of the invoice look to see if there is an agency. If there is not an agency list the account's address. If there is an agency List the agency address.
Hopefully, this shows all of it