Validation rules to prevent record creation

21 views Asked by At

I've got 2 objects Opportunity (standard) and billing schedule (custom). We want to prevent record 'Billing schedule' creation by a certain user (profil) when the opportunity stage name is : Win or lost. I've tried with this but it doesn't work :

AND(
(ISNEW()),
OR(ISPICKVAL( Affaires__r.StageName, "6. Gagné")
),
OR(
$Profile.Id = "2F00e1t000000u771",
$Profile.Id = "2F00e2p0000013WVx",
$Profile.Id = "2F00e1t000001C3X9"
)
)

Any ideas ?

0

There are 0 answers