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
diya kordiya kor 

Approval process on objects with Lookup relationship

My requirement is to create a approval process.
Object 1 has field :quantity  .
   If quantity is greater than certain number it needs to go for approval.
   Once approved  it should autopopulate the approved date field and  the name of the person who approved it in object 2. 
object 1 and object 2 have lookup relationship

Heres what I did .
 1. I went to approvals and created a approval criteria for quantity and did the Email Alert for Initial submission actions in approval process.
 2. I created a workflow rule for update on Object2
   
    workflow action1 : Field to update : Date of approval
                               Formula value : Today()
    
    workflow action2: Field to Update    : Approved by 
                              Formula value      : $User.Username

3.I go back to approval process-> approval steps->approval actions->Add existing..
I cant find field updates that i need to create because i created them in object 2 as object 1 and object have lookup relationship

How can I solve this problem. Any help is appreciated.
 
Jerun JoseJerun Jose
Approval processes cannot perform a cross-object field update. One option to get the approver's name stored in a custom field on the child object and use an apex trigger to populate this value to the parent record. Even a workflow which does a cross-object field update cannot be used as this is a limiation of field updates in Salesforce.