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
MiguelGuerreiroMiguelGuerreiro 

Filling field automaticly

Hello,

I hope this is the place to ask for help :)

I want to populate the case field "country" with the user field "country". This would be done when a new case is created. The user field country would be read-only for the user and I would have another field depending on this one.

Many thanks to the one who helps :smileyhappy:

Miguel
KaushikKaushik
       Hi,
I couldn't really get your question.
So I assume that, you want to have a field in the Case that is read-only and  populated with the name of the Country (of salesforce user)?
if this is the case then you could create a formula field in the case and have a formula like
$User.Country

Hope this helps you out

Kaushik
MiguelGuerreiroMiguelGuerreiro

That's exactly what I want :)

Thanks!

MiguelGuerreiroMiguelGuerreiro

Hello again,

New problem: I want that formula field to be a controlling field for a picklist. It doesn't seem possible... Any workaround?

Many thanks,

 

Miguel

KaushikKaushik
    Hi Miguel,
I think thats not possible directly.But you could use the validation rules to enforce the logic.
Another work-around -
Field dependecies are only possible if the controlling field is a pick-list or a check box.You could also make the formula field a pick list with all possible countries and then use that to control the pick-list

Kaushik