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
James Gauci 7James Gauci 7 

populating WhoId with formula

Hi all, I have a problem that regards predefined fields in Event creation Action.

Currently, the action that creates the event (in this case named 'Stipula Atto/Contratto') has 2 predefined fields. One is the 'Nome' or Name field, which is the preset WhoId field, and the other is custom field called 'Venditore'. These can be see in the image below:
Image of Predefined Fields
Both of the fields hold references to a Contact. The problem is, we want the value currently being predefined in the 'Venditore' fields to be concatinated to the 'Nome' field. 

We've already attempted concatinating both formulas into the 'Nome' field, however the following error arrises when this is done: 

Error: The data type of the formula result (Text) is not compatible with the expected data type (Search (Lead, Referent)).

This is shown in the image below:

Error for concatination

I understand that the error explains that concatination parses the reference into text, so I would like to know how to concatine 2 contact reference into 1 field, while keeping both references as actual contact references.

I'm assuming it is possible to add multiple contacts into the WhoId field because it is already possible to add multiple contacts into the field manually when creating the activity. Can anyone point me into the right direction about how to solve this problem? Thank you very much.
 
Piyush Gautam 6Piyush Gautam 6
Hi James,

use + instead of &.

Like: Account.Name + ' '+CaseNumber (For Example).

Mark as solved if found helpful.
Thanks
James Gauci 7James Gauci 7
Unfortunately that gives the same error. Attempted both with and without a space in the middle ('' and ' ' and without anything at all just a +)

User-added image
Piyush Gautam 6Piyush Gautam 6
Hi James,

What is the datatype of the field in which you are using this formula. As in my case, i have taken a formula field with text as the datatype.

Thanks
James Gauci 7James Gauci 7
The field is of datatype Reference, since the field i'm trying to populated is the WhoID. It should be able to handle multiple references since you can do this manually, I just need to know how I can put multiple References into it automatically through formula.
Piyush Gautam 6Piyush Gautam 6
Hi James,

As you want to add two Id in one single reference field that's why it is showing an error. Since one reference field will take only one Id ( and that should be of that particular object of which the reference is in the field).

You can't achieve this functionality of showing two records as a reference is a single field.

Thanks
James Gauci 7James Gauci 7
I see, however this is allowed manually as can be seen here:

User-added image
That is the same 'Nome' field, have 2 different Contacts. The difference is that while (in this case) mario rossi was already added there automatically, Testone Testone had to be added manually. That is what i wish to avoid.
James Gauci 7James Gauci 7
Regarding the above problem, I'd like to pose another question that might bypass the above. Is it possible to set another field (apart from the WhoID field) to be used as a Related To field? Because if so, by keeping both WhoID and the custom Venditore field, I will still obtain the functionality I need. Thoughts? Thanks