Advanced Installation TopicsMicrosoft Dynamics NAV Changes

Microsoft Dynamics NAV Changes

Sana Commerce 8.2
Your provider

NAV 4 Changes

Error Messages Handling in MS Dynamics NAV 4.0 (Standard or PFS)
In SC - Execution Context codeunit for NAV versions starting from NAV5.0, the GETLASTERRORTEXT function is used for handling error messages automatically, but in NAV4.0 this function does not exist. Therefore, a new public CauseError procedure in the Codeunit 11123305 SC - Execution Context, has been created for handling error messages manually. This procedure should be used instead of the standard ERROR function in order to get cause errors and rollback transactions in NAV4.0. Also in order to handle standard NAV errors, this procedure can be used in combination with such standard MS Dynamics NAV functions as GET, INSERT, MODIFY, SETCURRENTKEY and so forth. The CauseError procedure has one parameter:
 
ErrorMessage [Text 1024] - The text of an error message.
 
The final text of an error will be extended automatically by 'FunctionToCall'. In case an unexpected (not handled manually) error occurs, the following error message will be returned: 'Unexpected runtime error occurred. Use debugger to identify a specific line of code.'
In that case it is required to use debugger to find the problem. For that purpose the Form 11123314 SC - Manual Process Requests is available as a part of Sana Commerce package. More detailed information can be found here.
Advanced Installation TopicsMicrosoft Dynamics NAV Changes