RE: Error Function SrsPrintDestinationTokens::constructByTokenType has been incorrectly called when open any report
First, Thanks for your reply
I've compiled the application using the
axbuild.exe xppcompileall /s=01 /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin"
but still the same problem.
I have an old backup of the system 2 days ago where the problem wasn't exists, After some debugging I've noticed that in method: SysExtensionAppClassFactory.getClassFromSysAttribute
which have:
searchStrategy = SysExtAppClassSearchStratDepth::newForCacheKey(_baseClassName, attributeInstance.parmCacheKey());
cachedResult = searchStrategy.search();
The cachedResult in the backup version returns Size: 1 but in the live server returns Size: 0 which cause the problem
Another way to solve the problem is changing in class: SrsPrintDestinationTokens.constructByTokenType
if I changed the _tokenType from Worker to be None the reports working normally and the cachedResult in SysExtensionAppClassFactory.getClassFromSysAttribute return Size:1 but what about the consequences:
SrsPrintDestinationTokensExtAttribute extensionAttribute = new SrsPrintDestinationTokensExtAttribute(_tokenType);
SrsPrintDestinationTokens destTokens = SysExtensionAppClassFactory::getClassFromSysAttribute(classStr(SrsPrintDestinationTokens), extensionAttribute);
I still cannot figure out the reason.
Any idea?