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
TheLearnerTheLearner 

Giving read and edit permission for the profile

Hi Experts,

I need to write validaton rule for this scenario, Could you help me please

If profile='SCC Procurement' select the Organisation_Type__c='Supplier' then we need to provide Read and Edit access for the user, if the Organisation_Type__c !='Supplier' then we need to Provide only Read access and if he try to edit the record we need to provide error msg
Amit Chaudhary 8Amit Chaudhary 8
Please try below Validation rule.
AND
(
   $Profile.Name = 'SCC Procurement',
   Organisation_Type__c !='Supplier'
)

Please let us know if this will help you

Thanks
Amit Chaudhary
TheLearnerTheLearner
HI Amit,

Could you help me please

My requirment is  i have object called Site__C it contains fields called , Public_Site_Clear__c,Private_Site_Clear__c,Site_Clear__c so what we need to do that 

When Public Site Clear(Public_Site_Clear__c) and Private Site Clear(Private_Site_Clear__c) dates are both populated, trigger the update (on initial population only) of the Site Clear(Site_Clear__c) field with the latest date. i.e Public Site Clear = 23/10/2015, Private Site Clear = 02/11/2015, therefore Site Clear = 02/11/2015. If the dates are subsequently changed then do nothing.
TheLearnerTheLearner
HI Amit,

its showing error because Orgnisation Type is multipicklist value, could you tell me how to do that
Amit Chaudhary 8Amit Chaudhary 8

Please try below. I hope that will help you
AND
(
   $Profile.Name = 'SCC Procurement',
   Text(Organisation_Type__c) !='Supplier'
)
Please let us know if this will help you
 
TheLearnerTheLearner
HI Amit,

Getting this error: Error: Field Organisation_Type__c is a multi-select picklist field. Multi-select picklist fields are only supported in certain functions.
TheLearnerTheLearner
HI Amit,

sorry here organisation type is piclist value not multipicklist values , could you please update me 
Amit Chaudhary 8Amit Chaudhary 8
Above validation rule should work on picklist
TheLearnerTheLearner
HI Amit,

Its working fine for supplier, but when i select other picklist value its throwing error but our requirment is that we need to provide read access right but it throwing error