• rogerfeder
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0

trigger HandleProductionPriceChange on<a href="http://www.buywatchesandjewelry.com/"> rolex </a> Marchandise__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 Ii:openLineItems){
if(Ii.Merchandise__r.Price__c < Ii.Unit_Price__c){
 update openLineItems;




Error: Compile Error: Didn't understand relationship 'Merchandise__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 2 column 34




Unable to figure out the problem.

I had written this trigger on force IDE and while saving it gave an error :File only saved locally,not to server