Hi all,
I was thinking to create a function which will work just like the compilation process in Navision 2009 and Later.
I mean to say that i want to process multiple objects at a time.
If particular condition (run time error in object) met it should be inserted a record in a table.
And after the process it should display results in one go.
Now this function should be similar to the compilation process in Navision 2009 & later. This process compile selected objects and if error found it creates an entry in error list table. After process completes it shows the list.
Can anyone please tell me what would be that function that complies objects and create an entry if error found.
Because when i am trying that i doesn't go ahead if an form have run time error. Its because Form doesn't return anything in case of error.
Thanks in advance
Saurav Dhyani
0
Answers
This can be done by putting them in codeunits, if you run a codeunit (just the codeunit's onrun trigger, not a specific function) and demand its return value, it will not throw a runtime error, it will just return false, you can catch the error message with GETLASTERRORTEXT. Read more about this here:
http://msdn.microsoft.com/en-us/library/dd301214.aspx