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
divya1234divya1234 

not counting reacord through flow and process builder

Hi All,

I need someone 's help who is expert in the flow. i want to count the task(where ingenus task check box is fals) on lead objcet. i cfreated flow and calling flow into process builder but not getting result on lead . here are the screenshots of flow and process builderUser-added imageUser-added imageUser-added imageUser-added imageUser-added image
divya1234divya1234
User-added imageUser-added imageUser-added image
Parker EdelmannParker Edelmann
Hi Divya Bhagat,

You're very close. It looks like you did everything right, but I think you're passing the wrong Id field into your flow. Instead of passing [Task].Id (which is the Id of the Task itself), pass in the WhoId field, which will end up looking something like [Task].WhoId.

With that said, I do want to make sure that you're aware that the WhoId field is what they call a polymorphic field. That's just a fancy way of saying that that lookup can refer to more than one object, in this case, the Contact and Lead Objects. One thing that I'd advise you do is set a criteria in Process Builder that says something like "[Task].WhoId Starts with '00Q'". If you're not familiar with it already, Salesforce Ids always start with a key prefix, that is, three characters that denote what object that record belongs to. Contact Ids begin with "003", while Leads begin with "00Q". So if you make sure that the WhoId starts with "00Q", you would then only launch the flow when it's a Lead in the WhoId field instead of a Contact, thereby saving system resources.

Let me know if this works for you.

Regards,
Parker
divya1234divya1234
Hi Parker,

Thanks for your reply i tried to pass whoid into variable as below. i am not sure where i can pass Leads begin with "00Q into process builder.User-added image
divya1234divya1234
User-added image
still it is not working can you please help me what i am missing 
Parker EdelmannParker Edelmann
Hi Divya,

Everything in your Process Builder looks right. I gave your Flow screenshots a second look, and in your Fast Lookup, you're looking for Tasks that have an Id equal to what we've now set to be the Lead's Id, which is an impossibility. The fix is easy, just change the field from Id to WhoId in your Fast Lookup and hopefully everything should work as expected.

Let me know if that works for you, or if another problem arises.

Best,
Parker
divya1234divya1234
No Luck :(
User-added image
 
Parker EdelmannParker Edelmann
Hmm... It looks like your Assignment element isn't connected to the Loop, therefore the flow is ending before anything happens. Can you check that and report back? I think that should do the trick this time.