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 OrtegaRicardo Ortega 

Problem with Junction Object

I have a junction object with two master detail relationships, one to contact and one to program. I was told to create a text field that is Unique and has default value ContactName and ProgramName to avoid duplicates. Problem is, i write Contact__r.Email & "-" & Program__r.Name and it always says either it doesn't exist or it cant be used there.

Val ValinoVal Valino

Is it possible that some of your contacts don't have an email enterred?

 

Also, try text(Contact__r.Email)

Ricardo OrtegaRicardo Ortega

It is a required field, also program name is a required field

AshlekhAshlekh

hi,

 

How can you give the default value to text  Contact__r.email and Program.name because the record of (junction object )  is not created then how you can fill the default value.

And I think you doing something wrong when you creating a new field of text type and giving some hardcode value by writing  Contact__r.Email & "-" & Program__r.Name in default value editor (it is hardcoding ) . And you have  to click on  show formula editor and see the available fiels 

 

If this one help you than mark as solution and dont forget me to give kudo;s by click on star icon at the under of D-horse name

 

Thanks 

Ashlekh (D-horse)