Field has not been explicity selected

When working on a AX2012 implementation I received following error when I printed the customer collection letter.
Image
Somehow the field VATNum can not be selected in this method.
Although the proper configuration keys were selected, this method kept present.
After reading Ivan Kashperuk blog post about this matter, I found the problem in the method CustCollectionLetterJourDP\processReport and made following change:
//BEGIN 30.07.2013 Solve error Field ‘VATNum’ from table companyinfo has not been explicity selected
//companyInfo = CompanyInfo::find();
select companyInfo where companyInfo.dataAreaId == curext();
//END 30.07.2013
Somehow, the find() method doesn’t return the vatnum field. After I made a plain select, the error disappeared and the report runs smooth.
So when you receive this error, always check for the linked datasource and check the problem!
Hope this helps!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.