Somehow, some of the notes that I want to create a new method don’t have the ‘new method’ option shown when right click on it, as the first picture I am posting here, while normally, we would have the menu shown as the 2nd picture when right click the ‘methods’ note for datasources or tables.
I was suspecting the ‘SalesQuotationListPage’ in the first picture is checked out by another member, say from somebody working in the VAR layer, but I cannot convince myself.
Oh, by the way, I cannot add ‘SalesQuotationListPage’ to version control, AX is saying it cannot be added to version control, as it does not exist in the cus layer, but SalesQuotationListPage is offered from Foundation, why it’s not in CUS layer?
Is there any reason why I come across the case shown as the first picture here?
The first issue is simple - methods in data sources are not allowed for list pages (while they’re allowed for other for types). You have to use ListPageInteraction class for such things.
The latter problem is caused by highly confusing behavior of AX, but it’s easy to resolve it. The form is in SYS layer only (you can see it beside its name in AOT), but your version control is configured for CUS layer. You have to get the object to CUS layer first. How to do that? Simply change anything in the form and the form will become part of current layer (so you have to be logged in CUS). Then you will be able to add it to version control.
Thank you very much, Martin! I found the SalesQuotationListPageInteraction class. One more thing, though, generally speaking, how does the ListPage form and the corresponding ListPageInteraction class cooperate? Is there some document that I can refer to? I am still not familiar with this mechanism for now.