I have some code from a method that is not working correctly (See code below) What is happening is after some text is entered into a data field and the item is saved the IF condition is false. But on the second save the IF condition becomes true. Which is the correct behavior I am looking for.
Code snippet:
string itemAction = this.getAction();
string itemVersion = this.getAttribute("version","");
if (itemAction != "version" && itemVersion != "0") {
So what I am trying to understand is what the variable "itemAction" is doing. If I remove the IF condition "itemAction != "version" " the code works correctly. I am fine with removing this condition but I am afraid I might be missing some other issue.
Any thoughts
Thanks
G.Teachout