You need to sign in to do that
Don't have an account?
how to make field read only when the field which is picklist changes to other value
Hi,
Please find the solution.
Actually there are two custom fields
1:payment date
2:invoice status
where payment date is a date field and invoice status is a picklist field which has the picklist values 'approved,onhold and paid.'
When invoice status=paid
then payment date should be editable
but when invoice status =onhold or approved.
payment date should not be editable
what i had done in this,i had created a new record type for which payment date is editable,and i had created a new page layout .then i had written a workflow for this.but this is not working.
Please advice
Thanks
Hi Nasir,
It is not possible to suddenly change the standard pagelayout, hence I would like to see the requirement in different view.
> When Invoice Status == Onhold or approved, changes made to payment date are not valid.
So there are two ways of achieving this
1) Validation rule to throw an error when Payment Date changes during Invoice status onhold, approved
AND( OR(ISPICKVAL(Invoice_Status__c, "Onhold") , ISPICKVAL(Invoice_Status__c, "Approved")), ISCHANGED(Payment_Date__c))
2) Trigger :
Undo the changes on payment date if Invoice Status finally comes to onhold, approved
Thanks
It worked well.but validation rule restrict us when invoice status is approved or onhold. Can it be done by creating a page layout and recordtype in which payment date is read only when invoice status is approved or onhold?i mean when i select invoice status to approved or onhold,there a different pagelayout should come where payment date cannot be changed.