You need to sign in to do that
Don't have an account?
Simon Whight
Visualforce Component - where am I going wrong?
At the moment, I'm trying to "hello world" this component to put into a VF email. I am massively struggling though.
Here is what I have. First the Apex - this is to get the Contract whose detail is needed, the ID I am planning to get from the Contract record where the "Send Email" button will be hosted:
I'm just trying to get an example 4 fields to put into the component!
I haven't got as far as putting the component in the VF email because I can't do the above. I'm expecting to have something like:
I can see what I am trying to do logically, my skills are letting me down. Can anyone help?
Thanks and Happy New Year!
Here is what I have. First the Apex - this is to get the Contract whose detail is needed, the ID I am planning to get from the Contract record where the "Send Email" button will be hosted:
public class findContract { public Id conID {get; set;} Public List<Contract> currentcontract = new List<Contract>(); public List<Contract> findCurrentContract() { currentcontract = [SELECT Id, StartDate, Business_Type__c, Affinity__c, ContractTerm, CompanySigned.name, CompanySignedDate, CustomerSigned.name, CustomerSignedDate, CustomerSignedTitle, EndDate, Services_Taken_AI_Only__c, Services_Taken_AI_Only_HS__c, Services_Taken_Advice_Only__c, Services_Taken_Advice_Only_HS__c, Services_Taken_Franchise_Comp_EL__c, Services_Taken_Franchise_Comp_HS__c, Services_Taken_Consultancy__c, Services_Taken_Franchise_Entry_EL__c, Services_Taken_Env__c, Services_Taken_eRAMS__c, Services_Taken_FRA__c, Services_Taken_HS__c, Services_Taken_SBP__c, Services_Taken_Training__c, Services_Taken_JIT__c, H_S_Notes__c, Finance_Notes__c, PEL_Notes__c, SpecialTerms FROM Contract WHERE Id = :conID]; return currentcontract ; } }Then we have the Component, currently this will not save with this error ( Error: Could not resolve the entity from <apex:outputField> value binding '{!con.ContractTerm}'. <apex:outputField> can only be used with SObjects, or objects that are Visualforce field component resolvable. )
I'm just trying to get an example 4 fields to put into the component!
I haven't got as far as putting the component in the VF email because I can't do the above. I'm expecting to have something like:
<c:DisplayContractDetails ContractID="{!Contract.Id}"/> *** I'm assuming I'll have to do something a bit more advanced to pull the current records id
I can see what I am trying to do logically, my skills are letting me down. Can anyone help?
Thanks and Happy New Year!
Finally got it to save, nothing is coming back in my table though.
conID is hardcoded at the moment and should be returning something.
It is as if there is nothing happening in the apex.