Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Automate Transaction Import

(0) ShareShare
ReportReport
Posted on by 145

I'm a C# developer for my company, and we currently have a process that involves creating a CSV of invoice data, which is then imported into Dynamics SL everyday. I was recently asked to automate this import step so that it can be performed without human interaction.

I have no experience with Dynamics SL at all, and I've been looking through the documentation and I'm not really sure where to start, or if this is even possible. Will this require me to write code? If so, where can I find the appropriate libraries? Everything I've found indicates that I'll need to use VB6, except for one document (VisualBasicConversionToolkit.pdf in the documentation. I found this slightly older version online).  Can I use .NET or will I need to use VB6?

Sorry if this post seems directionless and fragmented, every time I think I'm on the right track I've hit a dead end or broken links. It's been slightly frustrating.

We're using Dynamics SL 2011 Feature Pack 1. Thanks for any help.

*This post is locked for comments

  • Erich Strelow F Profile Picture
    Erich Strelow F 2 on at
    RE: Automate Transaction Import

    I'm just testing a code in order to submit import files through a web application using Application Server.

    Here's the code. It's VB, but the translation to C# should be easy. The  csv file and company name are provided in the web request. This is coming fresh from the oven.

    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
    
    Dim aReq As ASDevObj.ASRequest
    Dim dtaFile As String
    Dim conn As New ASDevObj.S4DBConnect
    
    'These settings actually are not enough. You should set the solomon.ini database configs too in order
    'for the AS interface to startup correctly
    'The WindowsAuthentication member is not documented. You should use S4Password instead if you have SQL auth
    conn.S4Company = "MPCSA"
    conn.S4Database = "MPCLicSYS"
    conn.S4Server = "chesungun"
    conn.S4User = "ATOMANT"
    conn.WindowsAuthentication = True
    conn.S4DBOpen()
    
    If context.Request.Files.Count = 0 Then
    context.Response.RedirectPermanent("error.aspx?reason=missfile")
    End If
    
    dtaFile = context.Server.MapPath("App_Data\data.txt")
    context.Request.Files(0).SaveAs(dtaFile)
    
    aReq = New ASDevObj.ASRequest
    aReq.AddCompany(context.Request.Params.Item("company").ToString)
    aReq.RequestorsEmail = "esf@moller.cl"
    aReq.RequestDescription = "Carga Payroll"
    aReq.AppServerName = "ATOMANT"
    aReq.AddTIRec(0, dtaFile, context.Server.MapPath("app_Data\payroll.ctl"), context.Server.MapPath("app_Data\payroll.log"), "0101000", "")
    aReq.ReqType = "P"
    aReq.Priority = 2
    aReq.TIProcessing = "2"
    aReq.TILogInfo = "2"
    aReq.TIErrors = "50"
    aReq.UserId = "ESTRELOW"
    aReq.RequestName = "98500"
    
    aReq.Submit()
    Debug.Print(aReq.id)
    End Sub


  • LeeRoy Profile Picture
    LeeRoy 36 on at
    RE: Automate Transaction Import

    Hi Rajesh

    Could you find a solution for this???

  • rajeshlohakare Profile Picture
    rajeshlohakare 5 on at
    RE: Automate Transaction Import

    Hi Sivaram,

    I want to import data using my own utility. I want to develop it in C#.net. Could you please provide sample application of it using C#.net.

    Thanks,

    Rajesh Lohakare

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Automate Transaction Import

    Hello,

    Data import can be done in 2 possible ways either with TI or through Solomon Object model. We prefer Solomon Object Model to import the data into SL as it is the most robust and we can create SL as object to import the data from other applications . You can do something like below.

    1.  A C#.Net application can be automated and scheduled at 5 PM everyday to import the data from CSV files into a SQL temporary table and then into SL using object model programming.

    2.  C# program should be hosted into the machine that SL exists and should be running all the time (just like process manager).

    3. The prerequisites is the SL company id in each line within the CSV file to identify the destination company in SL.

    4. The grouping of records can be done based on Customer ID  (I assume you are importing the AR invocies) and each group will create a seperate AR batch ( you can define your own grouping as per the need in SQL).

    This might help you a bit.

    Thanks,

    Sivaram.C.S

    Congruent Infotech Pvt. Ltd

  • cavvon Profile Picture
    cavvon 145 on at
    Re: Automate Transaction Import

    Thanks for the reply!

    However, this isn't exactly what we need. Right now we automatically generate a CSV of invoices everyday from a different system, and our accountant then needs to import these invoices into Dynamics manually (granted, this isn't that hard, but I'd like to automate the whole process).

    So really, all I want to do is automatically import a CSV from a static folder into Dynamics at 5:00 everyday. I could just make an SSIS job, but I'd rather not mess with the raw database.

    The command line option seemed promising (I could just schedule a batch file to run), but our accountant is actually managing two (possibly three soon) different companies, and the command line call for TI doesn't have a switch for company.

    I was hoping there would be a simple 3 hour task, but I'm starting to think this will take me quite a bit more time.

  • Adam Leonard Profile Picture
    Adam Leonard 2,151 on at
    Re: Automate Transaction Import

    Hi,

    You can automate transaction import by using it in conjunction with Application server.  How this would work is that you would have application server running on a dedicated machine.  On this machine, you would have an outlook profile set up and running.  Users could email jobs to the application server outlook instance using a template and application server would pick this job up and run it in Transaction import.

    Does this sound like what you are looking for in terms of automating TI?

  • cavvon Profile Picture
    cavvon 145 on at
    Re: Automate Transaction Import

    I found information on transaction imports in the SystemManager.pdf document. This indicates how to start transaction import from command line, which I think will be enough for me.

    Thanks.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans