How to trigger OnNewRecord of a Sub Page?

My requirement is to update Purchase line Type field with default value based on the user selection of Purchase Order Type when creates a new Order. When ever creates a new record it will prompt three options to select. Based on the user’s selection the sub pages visibility is managed and the Type field is getting updated with a default value. And also it is working fine for the first two options and not working the last option which is Service. I found that when ever I select first 2 options the OnNewRecord trigger of the three sub pages are getting triggered and the code to update the Type field is fired. But for Service the OnNewRecord is not getting triggered any of the sub pages. It seems property and code is same and not triggering OnNewRecord when I select Service(3rd Option).

Thanks,

Jithin.

Hi Jithin,
Sometimes what seems like a simple customization is not that simple… [;)]
I remember that I have done something like this, many years ago in the classic client. I also remember that there was a lot of unforeseen issues. Similar to the once you mention. The real issue was the way the document page and list sub pages works closely together with the primary key of the table. My guess is that the next issues you are going to face is when more types are added to the same purchase order. Then line numbering will become an issue too.

My best suggestion to you would have been to use the debugger and try it out here. But that’s difficult for you to do, as you could not debug pages in NAV 2009. Only forms. And they do not behave exactly the same.

So I would go back and see what is the actual purpose of this customization? Could the same be archived in a different way?