Update Field in Form_A on Success of Update Field Value in Form_B

Update Field in Form_A on Success of Update Field Value in Form_B



Hey Everyone!

I am a little stuck on this one. Here is the basic structure of the problem:
  1. Form A (Add_Case)
    1. Lookup Field (Multi-select): Form B (Add_Contact)
    2. Single Line Field: Hidden_Permission
      1. Function: concatPermField
      2. Single Line Field (Hidden_Permission) is connected to the Function concatPermField and Runs On Success of Form A (Add_Case)
  2. Form B (Add_Contact)
    1. Bi-Directional Lookup: Form A (Add_Case)
    2. Decision Box: Permission_to_share_case_information
Here's the issue: If user creates a contact via Form B (Add_Contact), then checks the Decision Box to True (Permission_to_share_case_information), then the user creates a case via Form A (Add_Case), goes down to Lookup Field (Multi-select) Form B (Add_Contact), adds multiple contacts, and one of the contacts Contact_Group.contains("Client's") = True, then the function works perfectly, and the output of Single Line Field (Hidden_Permission) field equals Function parameters. BUT, if user then goes back to one of the contacts attached to Form A (Add_Case) and changes Decision Box to FALSE (Permission_to_share_case_information), the Single Line Field: Hidden_Permission in Form A (Add_Case) does not update/reflect the change on Form B's Decision Box. 

My temporary solution: I created a workflow in Form B (Add_Contact) - see attached screenshot. This work flow works, however, I have to go back to the record from Form A (Add_Case), click the edit record button, then save the record to reflect the change from Form B (Add_Contact) Decision Box (Permission_to_share_case_information). 

Is there something I can add to my function or workflow that would automatically update the Single Line Field: Hidden_Permission in Form A (Add_Case) upon changing the setting in Form B (Add_Contact) on the Decision Box (Permission_to_share_case_information) field?

Thank you for any and all help in advance!!! 

Function Code:
  1. string Cases.concatPermField(int case_id)
  2. {
  3. case_record = Add_Case[ID == case_id.toLong()];
  4. case_perm = "";
  5. for each  contact in case_record.Contacts
  6. {
  7. if(contact.Contact_Group.Name.contains("Client's") && contact.Hidden_Permission = True)
  8. {
  9. case_perm = contact.Name.first_name + " " + contact.Name.last_name;
  10. }
  11. else
  12. {
  13. case_perm = "Client Only";
  14. }
  15. }
  16. case_perm = case_perm;
  17. return case_perm.toString();
  18. }