How to make Cases description readonly in editview after it has been save?
TIA,
Longki Dela Cruz
How to make Cases description readonly in editview after it has been save?
TIA,
Longki Dela Cruz
I presume that you only want it to become read-only once it has been populated with something. There are a few ways that you can do this, with each option depending slightly on the version/edition of Sugar you are using and the exact rules that need to be enforced.
However a base level resolution for this is to create a duplicate description field and make one a calculated field to copy the value of the other. You would then set dependencies so that the initial fields hides when the calculated one is populated with something, and use the same principal on the calculated field. This will make it look as if the field is suddenly becoming read-only, where in fact it is simply swapping the fields over.
If you are looking for something more than this let me know.
Hi Liam,
Im using Sugar Enterprise 7.6. Can help me get through this? :-)
Thanks,
Longki
Hi Roland Cadavos,
Ah so you have Advanced Workflows, this opens up a new option where you could use this. It depends on the specifics for how you want this to work, and if you need authorised users to be able overwrite the entered text or if it should be locked out for all Users.
Hi Liam,
How about locked out of all user wherein after saving, it will be on read.only on all views.
Thanks,
Longki
If you need it to be locked for all Users once it has been entered, that means that nobody will ever be able to change it without importing and updating or mass updating the record. Is this what you want?
Yes, so that they will be forced to add Note on the Case because the description has been disabled after saving.
Thanks,
Longki
That is fine, it just means that if they make a mistake when initially creating the Case that nobody will be able to fix the issue. This is the only reason I want to bring it to your attention as I conveniently done this last week for a customer, where I made it so that only a set of authorised Users could edit the field and I utilised Advanced Workflow instead of having a calculated field.
If that is what you want then one want 2 fields.
Field 1
Allows you to enter the Case text, set to not be shown via dependency when Field 2 is not empty.
Field 2
Shows the value of Field 1, set vie dependency to show when it is not empty.
This is the setup for the fields to swap other. Personally I would have only field 2 as reportable so you don't see it twice in reporting and have each field as a single column (one on top of the other). The reason I would do the single columns on top of each other is that when Field 1 hides and Field 2 shows, you don't notice much of a difference so it is not a big change for the User.
I have cloned the default description(Field1) textfield in studio under Case module, i named it description_c (Field2).
Checked dependent: visible if formula: not(equal($description,"")).
Am i doing the correct solution?
Additional question: What is the formula for Field1? :-)
Thanks,
Longki
Can you also post the things you done wherein a set of authorised Users could edit the field and I utilised Advanced Workflow instead of having a calculated field.
You can change the arrangement slightly to your personal preference, but when I done this I set Field 1's formula to be show Field 1 when Field 2 is empty. For Field 2 I set the formula to be show Field 2 when Field 2 is not empty. This means that the fields only swap once Field 2 is set.
The principal is the same for both really, however rather than having Field 2 as calculated I created a simple Advanced Workflow to copy the value across upon the record being saved. This worked nicely as it means the fields don't actually swap over until the record is created. I then put a Role in that specifies Field 2 is Read Only for the User I set.