0

I have two custom objects "A" & "B"and it has one to many relationship meaning A can have multiple B records. I want to update a field "Access Date" of child object B of date type whenever A record status gets changed. The status change functionality is working fine for all the below cases.

1) StartDate> today() & EndDate > today() Status => Future

2) StartDate< today() & EndDate < today() Status => Expired

3) StartDate<= today() & EndDate >= today() Status => Active

4) If Status changes to cancelled > It will remain cancelled and not update further even if start date and end date changes.

What I am trying to achieve through flow is:

1) If status = Active or future Update B(Access Date) = A(End Date)

2) If status = Expired Update B(Access Date) = A(End Date) + 30 Days

3) If status = Cancelled Update B(Access Date) = A(End Date)

While debugging flow is working and giving correct results but when trying through UI it seems Flow is not getting called from process builder but other actions of process builder are getting performed i.e status of A record gets changed on updating start & end date. Flow inputvariables flow

criteria

1 Answer 1

0

Is the Process Builder decision node giving the result that you expect? I add an action to post a Chatter message to myself as a way of debugging whether my decision node is returning true result.

How are you debugging without going through UI?

4
  • From UI when I am changing start and end date of A object the status is getting changed successfully which proves process builder is getting called and meeting the criteria also but the related object B has a field "Access To" it's not getting updated. There is an option in Flow from where we can debug the flow by passing the required hardcoded input values which it gets from process builder when process builder is called from UI upon meeting the required criteria. Mar 8, 2020 at 14:48
  • 1) How are you running the Flow when it gives correct results? 2) Please post some screenshots to show the criteria in the Process Builder
    – MikeA
    Mar 8, 2020 at 14:54
  • Screenshots added By creating record of A (parent object) and filling startdate & enddate process builder call flow for each status i.e Active, Future, Cancelled & Expired there is a criteria and in each one of the criteria flow is called then inside the flow through decision update record updates the "Access date" field of B(child object). Mar 8, 2020 at 16:31
  • Try using 'post to Chatter' actions in the Process Builder and the Flow to find out how far it is getting, and what the variable values are. Did you try updating the child records from the Process Builder? You can add action 'update related record' and child records can be selected. Looks like you may be able to achieve the desired behaviour using just Process Builder, without the need for Flow.
    – MikeA
    Mar 8, 2020 at 21:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .