Good Day,
I have couple questions on pages:
1) when the codeunit calls MyForm.RUNMODAL, how does the NAV knows that in RTC Page "MyPage" needs to be opened instead. Does it go by the name - open page with same name as form?
2) I have 3 fields on the list form A, B, C. Last field (C) can be populated only when first 2 have values in them. So i added some code on OnValidate trigger on the Table which TESTDIELD's both A and B. When i have A and B blank and I enter the value in C I get an error that A is blank. I can use arrows to get to A and change the value, then the error disappears and new one appears saying that B cannot be blank. In this case when i arrow to B and change the value the error does not disappear and stays there preventing me from making a change in C. I have to delete value inC and reenter it again. So I am not sure why for one field I can make a change and error will disappear and on another it would not disappear.
Thanks in advance
0
Comments
2. This looks like a bug and you should report it to MS. My guess they'll say it's how it's designed.
What suppose to happen is that if you get an error, and you fix it. It should revalidate all the fields based on how you entered. Basically follow the same sequence.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I cannot make it a hotfix for R2 so please request Microsoft.
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks for your responses, Rashed.
1. I guess I am asking, how does RTC knows that I need to run this particular page. where is the link of "Whn this page is run - run that form"?
2. I will report this. Another question though. If you are saying that it should validate them in the same sequence as were entered then that is not really clear. I entered field C which caused error becuase A was was blank. So i did not change the C, I went to A and entered a value (C still had value in it). So based on what you are saying it should validate C (i entered it first) and then A. But in real life it does A and then C.
I am just trying to figure out how does it determine sequence of fields to validate. This is crutial on some complex forms like Salesl Lines and such. Should we be writing code differently.....
2. What I meant is that RTC would be doing the validation not you. So just report it. You could as workaround add some code to blank C when entering B. This way the user would have to reenter C to continue.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I am just trying to figure out how does RTC determine the sequence of validations. Especially when error is raised. Do you know where I can read on this?
I think we got spoiled in Classic when the validation is happening right after the input. Here it looks to be a bit different since it can validate multiple fields at the time.
Thanks
Oleg
Let us say
1) enter a value for (field) A and get a validation error
2) enter a value for B and get a validation error
3) enter a value for C this does not give an error
4) the validation handler (VH) validates the value for A again but gives an error
5) the VH validates the value for B again and it does not give an error (due to C)
6) the VH validates the value for A again and it does not give an error (due to C and
Note that the entered values is only kept in the VH if they have errors. Also note that the validation is only done based on the entered fields that did not give error. The server roles back to the row that had no errors. Entering a value that is not giving an error is accepted and updates the servers row even though entered fields have validation errors.
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
So basically the VH will be looping through the Validations until all goes through.
Just so i fully understand understand, if i had extra field E that required no validation then your scenario would be like this?
1) enter a value for (field) A and get a validation error
1.1) enter value for E and do not get error
1.2) E is submitted to the database even though A is not?
2) enter a value for B and get a validation error
3) enter a value for C this does not give an error
4) the validation handler (VH) validates the value for A again but gives an error
5) the VH validates the value for B again and it does not give an error (due to C)
6) the VH validates the value for A again and it does not give an error (due to C and
Very interesting concept.
Thanks for sharing
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.