You need to sign in to do that
Don't have an account?
kalikota1.3945970503735664E12
i'm gettting this (''Entity is not org-accessible at line 1 column 1'') error when i'm trying to save my code....
trigger UpdateAmount1 on Quote__c (after insert, after update) {
List<Opportunity> parentObjList = new List<Opportunity>();
List<Id> listIds = new List<Id>();
List<Quote__c> newQuotes = new Quote[]{};
for (Quote__c childObj : Trigger.new) {
listIds.add(childObj.Qpp__c);
newQuotes.put(childObj.Qpp__c, Quote__c);
}
parentObjList = [SELECT id,Name FROM Opportunity WHERE ID IN :listIds];
for (Opportunity opp : parentObjList){
opp.Amount = newQuotes.get(opp.Id).Total_List_Price__c;
}
update parentObjectList;
}
List<Opportunity> parentObjList = new List<Opportunity>();
List<Id> listIds = new List<Id>();
List<Quote__c> newQuotes = new Quote[]{};
for (Quote__c childObj : Trigger.new) {
listIds.add(childObj.Qpp__c);
newQuotes.put(childObj.Qpp__c, Quote__c);
}
parentObjList = [SELECT id,Name FROM Opportunity WHERE ID IN :listIds];
for (Opportunity opp : parentObjList){
opp.Amount = newQuotes.get(opp.Id).Total_List_Price__c;
}
update parentObjectList;
}
richfer_
Check the api name of the object and fields you'd mentioned for "Quota__c"