Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

error on Automation for Sales Order Screen

Posted on by 234

Microsoft Dynamics SL7.0 Feautre Pack 1 - Business Essentials VB.NET

Im doing customized screen to automate SalesOrder Screen, but there's message popup  "Object reference does not set to an instance of an object."

When i run this exe on another Solomon Server(but still using the same SL7 and EXE), it works just fine

this is the code for reference :

Imports Microsoft.Dynamics.SL.ObjectModel   

 

Public WithEvents ordscrn As SIVApplication

 

Private Sub cmdProcess_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdProcess.Click

        Dim ISolErr As Integer

        Dim iOSErr As Long

        Dim ScrAct, startUser As Boolean

        On Error GoTo err_handler

 

        ordscrn = StartAppAndAutomate("4010000.exe", ISolErr, iOSErr)

        ordscrn.Visible = True

 

        ScrAct = True

        startUser = True

        Exit Sub

err_handler:

        'If OS Error loading app

        Select Case ISolErr

            Case 7506 'not logged in

                MsgBox("Can't run User Screen,Not logged in to Solomon.")

                Resume Next

            Case 7516 'Login context may not have rights

                MsgBox("Can't run User Screen,User may not have sufficient rights.")

                Resume Next

            Case 7517 'User Limit exceeded

                MsgBox("Can't run User Screen,Number of licensed users exceeded.")

                Resume Next

            Case 7521 'no user rights for Initialize mode

                MsgBox("Can't run  User Screen.No user rights for Initialize mode.")

                Resume Next

            Case 7555 'not a VBTools application

                MsgBox("Can't run  User Screen.Not recognized as a VBTools app.")

                Resume Next

            Case 7570 'App's Solomon Object Model is disabled

                MsgBox("Can't run  User Screen.Application programmer has disabled the Solomon Object Model.")

                Resume Next

            Case Else

                MsgBox("Can't run  User Screen.Unexpected error" & Err.Description) <---MESSAGE POPUP IS COMING FROM HERE

                Resume Next

        End Select

        startUser = False

    End Sub

 

 

*This post is locked for comments

  • Verified answer
    azizah Profile Picture
    azizah 234 on at
    Re: error on Automation for Sales Order Screen

    i'd found the solution already

    its the object model license key in SL7 is not the registration screen (95.250.00), under Modules tab.

    thanks :)

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: error on Automation for Sales Order Screen

    My suspicion is that StartAppAndAutomate is failing.

    That will make "ordscrn.Visible = True" error out, bevause ordscrn has not been populated.

    My understanding is that if StartAppAndAutomate succeeds, the final two parameters are zero.

    If either, or both, are non-zero, then it failed.

    From memory, one gives you Solomon errors, and the other gives you OS errirs.

    Barry

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans