Closed FH-Inway closed 3 years ago
Could you try to edit the file and load the module again?
I'm not the master mind behind this, so I need some help making sure we don't break stuff, while we add support for your scenario.
Would a switch parameter, changed the behavior be feasible?
Please read this, if you plan on editing the file locally.
https://github.com/d365collaborative/d365fo.tools/wiki/Load-individual-files-or-dot-source-the-files
Commands.ps1 is the file you should edit 😁
The error is actually caused in line 160 of Invoke-D365DbSyncMocule where the Invoke-D365DbSyncPartial function is called. The reason for the error is that this function declares the SyncList
parameter as mandatory, see commit f16ca1163a077d0bf9a2df09d3ad1237690dd5a4
I tried running the module sync with SyncList
not being mandatory and it seems to work. Also tested with an empty module that had no objects (so both SyncList
and SyncExtensionsList
are empty). It still ran the script, though it probably would make sense to add a check to the script and if both parameters are empty, abort it with a warning message.
The only other script that calls Invoke-D365DbSyncPartial
is Invoke-D365ProcessModule
, which does the same thing as Invoke-D365DbSyncModule
when it comes to database synchronisation. So I don't think making the parameter optional would break anything.
Let me know if I can go ahead with the change.
Please come up with a PR and let's work together to see if we can make it happen.
0.6.53 should contain the fix.
Calling Invoke-D365DbSyncModule for a module that contains only table extensions fails with the following error message. This seems to be caused by line 145 in the script Invoke-D365DbSyncModule.ps1
SyncList = $allModelSyncElements.BaseSyncElements;
Would be nice if Invoke-D365DbSyncModule would support this scenario or at least provide a meaningful error message.