You need to sign in to do that
Don't have an account?
Deb Halder
Invalid type compile error on trigger
Hello,
I am getting an error Compile Error: Invalid type: Opp_Top_X_Designation__c on the first two lines.
The field Opp_Top_X_Designation__c is a lookup to Opportunity from another object Top_X_Designation. Now either the setup is not correct of the format of the code line is not right. Please provide inputs.
list<Opp_Top_X_Designation__c> oppidlist = new list<Opp_Top_X_Designation__c>();
list<Opp_Top_Designation__c> updatelist = new list<Opp_Top_Designation__c>();
for(Top_Designation__c tx : trigger.new){
if(trigger.isUpdate || trigger.isInsert){
if(tx.Document_Attached__c == true && tx.Typeof__c == 'Contract'){
// mt.put(tx.Opp_Top_X_Designation__c, tx.Id);
// s.add(tx.Opp_Top_X_Designation__c);
I am getting an error Compile Error: Invalid type: Opp_Top_X_Designation__c on the first two lines.
The field Opp_Top_X_Designation__c is a lookup to Opportunity from another object Top_X_Designation. Now either the setup is not correct of the format of the code line is not right. Please provide inputs.
list<Opp_Top_X_Designation__c> oppidlist = new list<Opp_Top_X_Designation__c>();
list<Opp_Top_Designation__c> updatelist = new list<Opp_Top_Designation__c>();
for(Top_Designation__c tx : trigger.new){
if(trigger.isUpdate || trigger.isInsert){
if(tx.Document_Attached__c == true && tx.Typeof__c == 'Contract'){
// mt.put(tx.Opp_Top_X_Designation__c, tx.Id);
// s.add(tx.Opp_Top_X_Designation__c);
Let's say you have a custom field named Opp_Top_X_Designation__c on opportunity object then you can define a list for an Opportunity such as
If Opp_Top_X_Designation__c is String then make
Hope this helps and if it solves the puzzle then please mark it solved!
All Answers
Looking at the code which you have shared it seems that there should be no problem with the code. It would be really helpful of you share your whole trigger code.
Regards,
Ramakant
Let's say you have a custom field named Opp_Top_X_Designation__c on opportunity object then you can define a list for an Opportunity such as
If Opp_Top_X_Designation__c is String then make
Hope this helps and if it solves the puzzle then please mark it solved!