• Lon Jones
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I am trying to pass a prior value as a param to a flow that I need to call from apex because I need to cover the inability to deal with deleted records without apex triggers.  Can someone lend guidance as to how to access a record's prior value? thanks

I need something like this (I know it's not that simple)

  For (Animal_Location_History__c Animal : Trigger.Old) {
      // Call the Flow
        Map<String, Object> params2 = new Map<String, Object>();
        params2.put('varInputAnimalLocation', Animal_Location_History__c.Animal_Location__c);
        params2.put('varPriorLocation', PRIORVALUE(Animal_Location_History__c.Animal_Location__c));
        params2.put('varInputAnimalLocation', Animal_Location_History__c.Location__r.Id);
           Flow.Interview.Update_Location_Inventory Update_Location_Inventory = new Flow.Interview.Update_Location_Inventory(params2);
        Update_Location_Inventory.start();
        // System.debug('Animal Location '  + Animal_Location_History__c.Animal_Location__c    );
        
        }
 I have other pages in this site that utilize the contact object but when I use it in this page it makes the entire page read only.  The page works in the scope of a logged in user, but not with an external site. If I remove the ID Parameter, the page renders as it should, but obviously cannot update.   I have gone through all the public access settings in the guest profile for this site.  This is probably a simple thing, but I am too many hours into this to figure it out, any help is appreciated.
 I have other pages in this site that utilize the contact object but when I use it in this page it makes the entire page read only.  The page works in the scope of a logged in user, but not with an external site. If I remove the ID Parameter, the page renders as it should, but obviously cannot update.   I have gone through all the public access settings in the guest profile for this site.  This is probably a simple thing, but I am too many hours into this to figure it out, any help is appreciated.