Skip to main content



No record found.

Dynamics Business Central migration forum
Suggested answer

Invoke-NAVSanitizeField fail

Posted on by 34
Hi everyone I have been trying to run the function to sanitize the data of a BC onprem instance but I always get the same error, is there something I am missing.
The intention of all this is to migrate from onprem to online and this is one of the recommended steps to do before doing the migration.
PS C://windows//system32> $result = Invoke-NAVSanitizeField -ServerInstance BC230 -Tenant default
WARNING: UnhandledErrorMessage
Invoke-NAVSanitizeField : Retry failed after 4 tries. Retry settings can be adjusted in ClientOptions.Retry or by configuring a custom retry policy in
At line:1 char:11
+ $result = Invoke-NAVSanitizeField -ServerInstance BC230 -Tenant defau ...
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-NAVSanitizeField], AggregateException
    + FullyQualifiedErrorId : System.AggregateException,Microsoft.Dynamics.Nav.Management.Cmdlets.InvokeNAVSanitizeField
  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 11,260 User Group Leader on at
    Invoke-NAVSanitizeField fail
    Did you upgrade to BC230 on prem, or you implemented BC 230?
    If you have implemented, then you don't have to worry about that step. 
    Invoke-NAVSanitizeFields is only required when data is inserted from SQL (for NAV 2013 or higher).
    Pre NAV 2013 even data in application is not clean.
    In summary - 
    1. If you implemented in BC 15 or higher then skip this step.
    2. If you upgraded from NAV 2013 or higher and never inserted data from SQL then you can skip this step.
    3. If you upgraded from NAV 2009 or before then step is mandatory.
    Hope it helps.
    Saurav Dhyani

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,663 Super User

Martin Dráb Profile Picture

Martin Dráb 224,741 Super User

nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans