Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

SL7 and C#

(0) ShareShare
ReportReport
Posted on by 1,245

Hello Everyone

I'm new to SL development and was wondering if it is possible to write custom modules in C# instead of VB.NET.  Does swimapi (again I know very little of this) have any limitations if used in C#?

 TIA

Nayan

*This post is locked for comments

  • Paul Phillips Profile Picture
    Paul Phillips 590 on at
    Re: Re: Re: Re: SL7 and C#

    In theory both VB.net and C# compile down to the same or equivalent intermediate language code, however, I recall a hotfix awhile back that dealt specifically with calling Object Model from C# code, so perhaps there are some minor differences in the SL environment. The SL kernel is still C++ from what I understand.

    Also, launching the parent app from managed code is a little inconsistent sometimes, to put it gently. Make sure you have all hotfixes dealing with object model for your version (mind the SP level too), and there is a specific recommendation for adding a thread delay during launch (it deals with RPC) and also calling the garbage collection a couple of times (e.g . Collect / WaitForPendingFinalizers / Collect, Thread.sleep(delay), repeat) - described in KB article 952057.

    Be sure to check out these KB articles if you run into any issues:

    943294: Error messages when you try to use Object Model together with languages other than Visual Basic .NET in Microsoft Dynamics SL 7.0: "Automation error" or "Unable to establish connection with Parent.SIVToolbarRemoteObject"

    952057: Error message when you try to execute Object Model code in Microsoft Dynamics SL: "Did not receive signal from MSDynamicsSL" or "Unable to establish connection with Parent.SIVToolbarRemoteObject"

    Regards,
    Paul

  • pbrattin Profile Picture
    pbrattin 1,850 on at
    Re: Re: Re: SL7 and C#

    Absolutely you can write programs that utilize the Solomon Object Model in C#. I would guess you could write VBTools screens in C# but you would have to figure out the C# equivalent of the VBTools required objects, like the record buffers. Examples of those objects are shown in VB.Net.

     

     

  • George Sagen Profile Picture
    George Sagen 1,005 on at
    Re: SL7 and C#

    Here's a link to the SL Object Model Reference Guide:

    https://mbs.microsoft.com/downloads/customer/solomon/70adminguides/sl_ob.pdf 

    The document claims to be for: 

    "Other Windows programmers who need to write client applications that automate Microsoft Dynamics SL and who know a programming tool that can create COM automation clients. Such tools might include Microsoft Visual C++, Borland C++, Borland Delphi, PowerBuilder, and many other Windows programming tools. Although all of the examples that are offered are Visual Basic-based, the discussions apply to any COM client ."

     Geo

  • Nayan Mansinha Profile Picture
    Nayan Mansinha 1,245 on at
    Re: Re: SL7 and C#

    Both.  Additional screens in SL and using custom module using Solomon Object Model.

    TIA

    Nayan

  • pbrattin Profile Picture
    pbrattin 1,850 on at
    Re: SL7 and C#

    When you say custom modules, do you mean additional screens for a SL system or a custom module that uses the Solomon Object Model? How do you plan to use swimapi in C#?

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans