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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Automation in NAV 2016

(0) ShareShare
ReportReport
Posted on by 1,144

Dear Sir,

I have faced the below mentioned issue in NAV 2016 Database.

-----------------Error------------------------ 
Microsoft Dynamics NAV
--------------------------- 
Unable to create an instance of Automation Server
ScriptControl Object with CLSID = 0e59f1d5-1fbe-11d0-8ff2-00a0d10038bc
Retrieving the COM class factory for component with CLSID {0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}
failed due to the following error: 80040154 Class not registered
(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))..
---------------------------
OK
---------------------------
But the same thing is working fine NAV 2013 Environment.
What is the reason behind it ?
Note : 
The Automation Variable is  'Microsoft Script Control 1.0'.ScriptControl

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andrey Baludin Profile Picture
    3,941 on at

    Hi! You need to replace automation to dotnet variables. It's not very complicated.

  • subrata.bauri Profile Picture
    1,144 on at

    Thanks for your instant reply.

    I know that the automation to dotnet is my last option. But how the same is working fine in NAV 2013 ?

  • Suggested answer
    RockwithNav Profile Picture
    8,600 Super User 2025 Season 2 on at

    Some of the Architectural change, As a generic process I will always recommend to use DotNet Variables instead of Automation.

  • Suggested answer
    Roberto Stefanetti Profile Picture
    12,998 on at

    Hi,

    NAV 2013 had less control over Denial Of Service issues by design, from NAV 2015 the security policies have changed (restricted by Design),

    use DotNet Variables.

  • subrata.bauri Profile Picture
    1,144 on at

    Is there any default DotNet Variable exists for Microsoft Script Control 1.0 ?

  • Suggested answer
    Andrey Baludin Profile Picture
    3,941 on at

    Check this one:

    msdn.microsoft.com/.../system.web.ui.scriptcontrol(v=vs.110).aspx

  • subrata.bauri Profile Picture
    1,144 on at

    This is pseudo code which I need to execute thru the dotnet variable. This VB script is used to insert a entire row into an excel sheet. 

    Where do I get the same functionality in dotnet variable ?

    ScriptCtrl.Language('VBScript');
    ........................

    REPEAT
    ScriptCtrl.Reset;
    ScriptCtrl.AddObject('xl',Excel);
    ..........................

    ScriptCtrl.AddCode('SUB Insert()' + ............... CrLf + 'END SUB');

    ScriptCtrl.ExecuteStatement('Insert');

    UNTIL rec.Next =0;

  • Suggested answer
    Andrey Baludin Profile Picture
    3,941 on at

    Look at table 370 Excel buffer. Here we have functions for creation and managing excel books. It's much simple than doing the same with VB scripts.

    Also in RU localization there is codeunit 12416 Excel Management.

  • subrata.bauri Profile Picture
    1,144 on at

    Thanks for your advice!

    The Excel Buffer and Excel Automation are not performing well while exporting bulk record. But the VBScript code is performing very fast.

    The Script exports  an EntireRow while exporting into excel.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans