• CB IT Support - Robin
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Systems Analyst-Salesforce
  • Spectrum

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I am trying to create an xml package for deployment, however, I keep getting an error for a field update.
Deployment Error: "The approval process references the workflow action FieldUpdate UdpateStatus which doesn't exist on "custom object". I have an approval process on the custom object, however, I used Process Builder to autosubmit records for approval and one of the actions in the process is a field update that sets a value on the custom object to "Submitted for Approval". I have 2 other field updates in the approval process that update the same field and they aren't throwing the error, just the field update referenced in the flow. Can someone tell me how to reference a field update for a process in xml and which metadata name/type to use?
xmlSample
I am not a developer - not even close. I have a request to update fields to null when criteria is met and one of the fields is a multi-select picklist and I'm having a hard time accomplishing this request with workflow/field update or Process Builder. I believe this could be accomplished with a trigger but I know nothing about them. I have googled triggers and I've attempted to write one and I know it won't work as-is but maybe it will shed some light on what I'm trying to do. The request is: if the record type = 'x' and the record owner is changed to 'x', then set the status to Active and set the other 3 fields to null. 

for (Lead l : Trigger.new) {
 if (l.RecordTypeId = '012V00000008yPS' &&
     l.OwnerId = '00500000006xlI8')
    l.LeadStatus = 'Active';
    l.Blitz_Yield_Disposition__c = null;
    l.Blitz_Yield_Disposition_Reason__c = null;
    l.Blitz_Yield_Month__c = null;
     update l;
}