web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

in sales invoice if currency code is empty i get error attempt to divide by 0

(0) ShareShare
ReportReport
Posted on by 70

in business central In sales invoice i'm getting error attempt to divide by 0 after i updated the extension but i didn't change anything in sales invoice or currencies the default was in EUR but now if it's empty i get the error when trying to post the invoice any idea how to fix that ?

  • Suggested answer
    Dirk Profile Picture
    Microsoft Employee on at

    Which extension do you use?
    Does it work if you un-install the extension?
    I suggest you contact the extension developer to sort this out

  • Community Member Profile Picture
    on at

    Click Help- > Help & Support- > View Last Known error to see which object or function that throwing the error

  • samerabd Profile Picture
    70 on at

    when i go there i get this, not sure if it could help

    Error Code :Dialog:TargetInvocation

    Error Callstack:

    "Gen. Jnl.-Post Preview"(CodeUnit 19).Preview line 31 - Base Application by Microsoft

    "Sales-Post (Yes/No)"(CodeUnit 81).Preview line 6 - Base Application by Microsoft

    "Sales Invoice"(Page 43).ShowPreview line 4 - Base Application by Microsoft

    "Sales Invoice"(Page 43).OnAction(Trigger) line 2 - Base Application by Microsoft

    Error Object

    Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLDialogException: Exception of type 'Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLDialogException' was thrown. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLDialogException: Exception of type 'Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLDialogException' was thrown.

      at Microsoft.Dynamics.Nav.Runtime.NavDialog.ALError(Guid automationId, String message, NavValue[] values) in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    AL

    ALDialog.cs:line 486

      at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit19.Preview_Scope_1534813224.OnRun()

      at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run() in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    Runtime

    NavMethodScope.cs:line 456

      at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit19.Preview(NavVariant subscriber, NavVariant recVar)

      at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit19.OnInvoke(Int32 memberId, Object[] args)

      at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit81.Preview_Scope__1674943197.OnRun()

      at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run() in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    Runtime

    NavMethodScope.cs:line 456

      at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit81.Preview(INavRecordHandle salesHeader)

      at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit81.OnInvoke(Int32 memberId, Object[] args)

      at Microsoft.Dynamics.Nav.BusinessApplication.Page43.ShowPreview_Scope__760044787.OnRun()

      at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run() in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    Runtime

    NavMethodScope.cs:line 456

      at Microsoft.Dynamics.Nav.BusinessApplication.Page43.ShowPreview()

      at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run() in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    Runtime

    NavMethodScope.cs:line 456

      at Microsoft.Dynamics.Nav.BusinessApplication.Page43.Preview_a45_OnAction()

      --- End of inner exception stack trace ---

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at Microsoft.Dynamics.Nav.Runtime.NavApplicationMethod.InvokeMethod(ITreeObject obj, String methodName, Object[] args, Boolean resolveHandler, Boolean throwOnNotFound) in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    Runtime

    NavApplicationMethod.cs:line 53

      --- End of inner exception stack trace ---

      at Microsoft.Dynamics.Nav.Runtime.NavApplicationMethod.InvokeMethod(ITreeObject obj, String methodName, Object[] args, Boolean resolveHandler, Boolean throwOnNotFound) in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    Runtime

    NavApplicationMethod.cs:line 104

      at Microsoft.Dynamics.Nav.Runtime.NavForm.RaiseOnAction(Nullable`1 actionId, String actionTriggerMethodName) in s:

    repo

    src

    Platform

    Server

    Prod.Ncl

    Runtime

    NavForm.cs:line 830

      at Microsoft.Dynamics.Nav.Service.NSField.ActionField(NavSession con) in s:

    repo

    src

    Platform

    Server

    Prod.Service

    NSField.cs:line 425

      at Microsoft.Dynamics.Nav.Service.NSField.Action(NavSession session) in s:

    repo

    src

    Platform

    Server

    Prod.Service

    NSField.cs:line 376

      at SyncInvokeActionField(Object , Object[] , Object[] )

      at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)

      at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.RunInTransactionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs) in s:

    repo

    src

    Platform

    Server

    Prod.Service

    ServiceOperationInvoker.cs:line 353

      at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.<Combine>b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs) in s:

    repo

    src

    Platform

    Server

    Prod.Service

    ServiceOperationInvoker.cs:line 734

      at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TransientErrorRetryCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs) in s:

    repo

    src

    Platform

    Server

    Prod.Service

    ServiceOperationInvoker.cs:line 374

      at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.<Combine>b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs) in s:

    repo

    src

    Platform

    Server

    Prod.Service

    ServiceOperationInvoker.cs:line 734

      at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs) in s:

    repo

    src

    Platform

    Server

    Prod.Service

    ServiceOperationInvoker.cs:line 319

  • Community Member Profile Picture
    on at

    Can you try to Post it and send the error. Don't use preview.

  • Suggested answer
    Dirk Profile Picture
    Microsoft Employee on at

    If you still get this error after you un-installed the extension then please log a service request at Microsoft (if you are a partner)
    If you are a customer then please ask your partner to log a service request at Microsoft

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 676 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 483 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 310 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans