0

My company wants me to create a custom screen in solomon to load some data from a table in the database.

They said used visual studio .net and i see manuals it says use VBA.

What should I use? VBA or visual studio 5?

How do I create a new application?

tshepang
  • 12,111
  • 21
  • 91
  • 136
mark
  • 1
  • 2

1 Answers1

0

We got similar request from our customer. We're using Dynamics Solomon 2011. After doing some research, we found that we will need to create a development environment by installing VS 2008 first and then install Solomon over it. Installing Solomon after VS will setup some project templates in Visual Studio for Solomon development.

https://community.dynamics.com/product/sl/f/35/t/80585.aspx

There is some talks also that VS 2010 is not recommended for use when developing for Dynamics Solomon.

I believe also that there is SDK for Dynamics Solomon that you can use inside you application to connect to Solomon database and use data objects. We didn't try this yet but we found some references talking about developing code using this SDK.

http://www.microsoftdynamicsforums.com/forums/forum_posts.asp?TID=191&title=solomon-Object-model-code

Below is a sample code that uses Solomon SDK:

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Dynamics.SL.ObjectModel;
using System.Threading;
using System.Runtime.InteropServices;




namespace LoginSL
{
    class Program
    {
        [DllImport("kernel32")]
        static extern void Sleep(uint dwMilliseconds);
        public static Microsoft.Dynamics.SL.ObjectModel.SIVToolbar sivTB;
        public static Microsoft.Dynamics.SL.ObjectModel.SIVApplication sivApp;

        static void Main(string[] args)
        {

            sivTB = new SIVToolbar();


            sivTB.Login("servername", "systemdb", "company", "username", "password");

            sivApp = sivTB.StartApplication("9850000.exe");
            sivApp.Visible = true;

            string datafile = "C:\\0101000.DTA";
            string ctrlfile = "C:\\0101000.ctl";
            string outfile = "C:\\0101000.log";
            //In C# "\\" is the predefined escape sequence for backslash.

            sivApp.Controls["cdata"].Value = (datafile.ToUpper());
            sivApp.Controls["cfiletype"].Value = "ASCII";
            sivApp.Controls["cscreen"].Value = "0101000";

            sivApp.Controls["ccontrol"].Value = (ctrlfile.ToUpper());
            sivApp.Controls["coutput"].Value = (outfile.ToUpper());
            sivApp.Controls["cBegProcessing"].Value = true;

            Sleep(5000);  //remove the comment marks at the beginning of this line for workaround


            sivApp.Quit();
            sivApp.Dispose();

            //GC.Collect();
            //GC.WaitForPendingFinalizers();
            //GC.Collect();

            Sleep(5000);  //remove the comment marks at the beginning of this line for workaround

            sivTB.Logout();
            sivTB.Quit();
            sivTB.Dispose();


            //GC.Collect();
            //GC.WaitForPendingFinalizers();
            //GC.Collect();
            //MessageBox.Show("TI is complete"); // Displays complete message

        }
    }

    }
mohammedn
  • 2,926
  • 3
  • 23
  • 30