You need to sign in to do that
Don't have an account?
UriM
Don't understand the error message
Hi All,
I have a custom object and I try to create the following class but I cannot understand the error message, please help.
The custom object is called Qualification and the Lead record has a lookup field Qualification pointing to the Qualicaition record. The key of the Qualificaiton record is Name
public with sharing class Controller_Qualification { public ApexPages.StandardController standardLeadController; public ApexPages.StandardController myQualificationController {get; set;} public Qualification qualification {get; set;} public Controller_Qualification(ApexPages.StandardControll?er cntrl) { standardLeadController = cntrl; Lead lead = (Lead)cntrl.getRecord(); String qualificationName = lead.Qualificaiton; qualification = cache.load (Qualification.SObjectType, qualificationName); myQualificationController = new ApexPages.StandardController (qualification); } }
Thanks,
Uri
What is the error message, you didn't mention that.
Also in your code, when you use custom object then you should use the API name not the label.
So, whereever you are using custom object Qualification, replace it with Qualification__c
Hi,
Thanks for your feedback, I finally fix it by query the fields I need
I also change the object name to by with the __c.