function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jack reacherjack reacher 

ISCHANGED is not working in lookup reference fields ? Any Solution?

I have created a formula to prevent user to edit record after fulfiling some creterias. My formula is :
AND( RealSteer__Offer__r.Agreement_Closed__c =True,
      ISPICKVAL(RealSteer__Status__c, 'Mounted'),( RealSteer__Offer__r.RealSteer__Close_Date__c >  RealSteer__Offer__r.RealSteer__Property__r.Revenue_Close_Date__c ),

OR(ISCHANGED( RealSteer__Offer__r.RealSteer__Account__r.Name),
     ISCHANGED( RealSteer__Offer__r.Name),
     ISCHANGED( RealSteer__Blocking_Start_date__c ),
     ISCHANGED( RealSteer__Blocking_End_date__c ),
ISCHANGED(  RealSteer__Offer__r.Category__c  ),
ISCHANGED( RealSteer__Offer__r.RealSteer__Property__r.Name  ),
ISCHANGED(  RealSteer__Offer__r.RealSteer__Status__c ),
ISCHANGED(  RealSteer__Offer__r.Owner_Name__c   ),
ISCHANGED( RealSteer__Offer__r.Payment_Terms__c ),
ISCHANGED(  RealSteer__Offer__r.Blanket_Approval__c ),
ISCHANGED(  RealSteer__Offer__r.Printing_Charges__c  ),
ISCHANGED(  RealSteer__Offer__r.Mounting_Charges__c  ),
ISCHANGED(  RealSteer__Offer__r.Other_Charges__c ),
ISCHANGED( RealSteer__Offer__r.RealSteer__Approval_Status__c),
ISCHANGED(  RealSteer__Offer__r.Approved_By_Accounts__c ),
ISCHANGED(  RealSteer__Offer__r.Approved_By_Sales_Co_ordinatior__c )
))

Can anyone help me out to solve this issue?
AdrianCCAdrianCC
Hi,

You are trying to check from a child object if some fields have been changed on the related parent. This is not posible because the WF fires on the child when the child is modified, and not on the parent. ISCHANGED on the related parent doesn't make any sense...

You can try to have a WF rule on the parent RealSteer__Offer__c object that checks all those field if they have been modified and set a IsChanged checkbox to true. Next time you do a modification on the child object you verify if the RealSteer__Offer__r.IsChanged__c == true, and if it is then prevent the user from edit(validation rule)

Thank you,
Adrian