You need to sign in to do that
Don't have an account?
SFDC - Apex Error
Hi
Am getting the following error while creating APEX Trigger
Error: Compile Error: sObject type 'Line_Item__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. at line 3 column 1
Apex Trigger Subject :
trigger HandleProductPriceChange on Merchandise__c (after update) {
List<Line_Item__c> openLineItems =
[SELECT j.Unit_Price__c, j.Merchandise__r.Price__c
FROM Line_Item__c j
WHERE j.Invoice_Statement__r.Status__c = 'Negotiating'
AND j.Merchandise__r.id IN :Trigger.new
FOR UPDATE];
for (Line_Item__c li: openLineItems) {
if ( li.Merchandise__r.Price__c < li.Unit_Price__c ){
li.Unit_Price__c = li.Merchandise__r.Price__c;
}
}
update openLineItems;
}
regards
Jerome John
Are you sure that you have an Object with 'Line_Item__c' as API Name?
Check it out.
All Answers
Are you sure that you have an Object with 'Line_Item__c' as API Name?
Check it out.
Yes ..am sure the line item is Line_Items_c
Please guide to resolve the querry ...am not able to save ..for trigger testing
regards
Jerome John
here u are saying it is Line_Items_c but in the code it is Line_Item_c.. with out S.. check it out the API name
Hi All
The error ..got resolved ....the error was in Line_Item_c ..the exact line Item was Line_Items_c
Thank you
regards
Jerome John