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
Ricardo Aguilar 4Ricardo Aguilar 4 

Copying and storing the task Related To (Name)

Hello, I am trying to create a flow to identify the name of the Task "Related To" record. Particularlly for those tasks related to one Custom object. So, I created a flow followed from a process builder which starts every time a Task is created. The flow has been created with two data elements "Get records" and "Update records".
Get records: in order to identify the ID of the custom object from the task "Related To" ID and store the Variable.
Update records: in order to update the task field "Related to (name)" (Text) with the Name of the custom object.
But I think I am missing something or doing something wrong because my flow is not working. I would appreciate any help in this development.User-added imageUser-added imageUser-added image 
Gaurav HandooGaurav Handoo
Hi Ricardo

Basis your screenshots and explanation of the problem statement, it seems that you are fetching Opportunity Id (using a custom field created for the same) using the WhatId getting passed through Opportunity. However, in the Get Element, where you are fetching the details of the corresponding Opportunity, you are not fetching Name field which you are using in the Update element.

So, in the Get records element, add another field "Name" and your flow should work.

Feel free to contact (at gaurav.handoo@gmail.com) in case any further support is required

Cheers!
Gaurav