Readonly field after saving the record
-
10 мая 2012 г. 8:49
Hi
My entity called as Policy
In that have PolicyNumber, Proposalnumber are there.. once user enter and saved after
that that two field need to be read-only .
Please suggest on this how we can manage it
Rammohan
Все ответы
-
10 мая 2012 г. 8:56
write javascript on save of policy entity
in javascript --
if (Xrm.Page.ui.getFormType() != 1) {
Xrm.Page.ui.controls.get(field1).setDisabled(true);Xrm.Page.ui.controls.get(field2).setDisabled(true);
}
Pooja
- Предложено в качестве ответа Purush(MCTS) 10 мая 2012 г. 9:02
- Отменено предложение в качестве ответа Purush(MCTS) 10 мая 2012 г. 9:02
- Предложено в качестве ответа Purush(MCTS) 10 мая 2012 г. 9:02
- Помечено в качестве ответа Andrii ButenkoMVP, Moderator 17 мая 2012 г. 7:54
-
10 мая 2012 г. 9:00Модератор
Hi,
you can use javascript for this, you can check value of these fields if they are not null disable them
it should be something like below
var _Value = Xrm.Page.getAttribute(FieldName).getValue();
if(_Value!=null) //it means it has value disable it
Xrm.Page.ui.controls.get(FieldName).setDisabled(true);
Mahain : Check My Blog
Follow me on Twitter
Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.- Предложено в качестве ответа Mahender PalMVP, Moderator 10 мая 2012 г. 9:00
- Помечено в качестве ответа Andrii ButenkoMVP, Moderator 17 мая 2012 г. 7:54