As we all know, User related setups for queries, forms, reports etc are stored in SysLastValue table. This is a system table and can't be accessed directly through AOT.
Solution:
NOTE: PLEASE BACK UP YOUR SYSLASTVALUE TABLE BEFORE YOU ATTEMPT THE BELOW STEPS AND TRY TO VALIDATE THE STEPS FIRST IN A TEST/SANDBOX ENVIRONMENT
1. Created a definition Group for SysLastValue table
2. Filter only for SysLastValue table
3. Set up the filter criteria For export in our case we have to do for one user
4. Note that at this point when we do the export, the .dat and .def file which is generated won't be having any data in it. This is becoz by default the System tables are not included in the Standard Export/Import Wizard of AX.
We need to do a small code change inorder to achieve this, Go to AOT > Classes > SysDataExpImp
5. Modify the candoTable method inorder to comment out the code which does the system table check for SysLastValue as shown below
6. Now, once again do the export and there you go..
Initially, I tried to do the SQL way, but figured out that it doesn't work and moreover SQL is not the correct way as we can miss out on Recids.
Nice post!
ReplyDeleteI tried to follow your instructions and I exported with no problem... but I have not been able to import it. I always receive the "0 records imported" message.
Do I need to change something to import?
Thanks in advance.
António
Hi Antonio,
ReplyDeletePlease check if you have selected the proper company from where you need to export and also do verify once again the steps especially commenting the code shown in my post.
Thanks,
Dilip
In AX 2009, I am trying to export a user's SalesTable form setup using this tip. In the filter criteria for export, I specified the UserId, RecordType = UserSetup, and Name = "SalesTable". In the resulting .dat file, I see nothing in the Value field (blob?) and I am assuming this contains the setup information. Will this work without the value field?
ReplyDeleteThanks,
Kevin