Problem description
Analyse how EntireTable cache works by tracing T-SQL statements and using
wasCached method.Hints
Run select statements with and without where clause on server and client.
wasCached method.wasCached method.RPC:Completed events in SQL Server Profiler.static void TestJoinCache(Args _args) { CustTable custTable; CustGroup custGroup; select AccountNum, PaymMode from custTable join custGroup, PaymTermId from custGroup where custTable.AccountNum == "US-004" && custGroup.CustGroup == custTable.CustGroup; info(strFmt("CustTable from %1, CustGroup from %2", custTable.wasCached(), custGroup.wasCached())); } |
select AccountNum from custTable; select firstOnly AccountNum from custTable; |
firstOnly keyword is not used by a developer. For example:select AccountNum from custTable where custTable.CustGroup == '10'; if (custTable.AccountNum) { ... } |
firstOnly keyword.RPC:Starting and RPC:Completed events:\Forms\EcoResProductCreate\Methods\updateCallers method.Mandatory property on a field to Yes. Is it enough? No.Null value concept is important for a mandatory field, but null values are not supported in Dynamics AX. Instead there are default values for each data type and they are considered null.validateField method checks whether a user has entered a value in a mandatory field ...CacheLookup property in standard AX 2012 R3.CacheLookup property on all tables in standard AX 2012 R3 excluding temporary tables and derived tables (CacheLookup property can't be set on a derived table).CacheLookup property is presented belowMetadata node:Metadata?CREATE script in SQL Server Management Studio. You can also jump to the conclusion section.