Value not saved in custom page type while using enable condition

kalpak shambharkar asked on November 25, 2017 06:59

We have a scenario where we want to disable a field in custom page type when there is already a value in table for that, we have used enabled condition of that field in page type, but by using this condition we are not able to save the value in table, following is the condition which we have used to disable the field in forms tab "if (string.IsNullOrEmpty(filedname.Value)){true} else {false}". Is there any solution so that we can save the value in table

Correct Answer

Vukasin Andjelic answered on November 26, 2017 21:48

Hi Kalpak Shambharkar,

here is the solution

if(string.IsNullOrEmpty(EditedObject.FieldName)){
 return true;
}else{
  return false;
}
0 votesVote for this answer Unmark Correct answer

Recent Answers


Saurav Kumar answered on November 28, 2017 13:34

You should be fine using just the IF statement without the else part as well as given by Vukasin

1 votesVote for this answer Mark as a Correct answer

kalpak shambharkar answered on November 28, 2017 14:47

Thank you Vukasin, it worked for me

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.