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

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Run Econnect stored procedure from SQL server agent

(0) ShareShare
ReportReport
Posted on by 65

I am new to econnect . I want to run econnect tacreateemployee sp from sqlserver agent . Can anyone guide me how to do it

Or can I call econnect tacreateemployee sp from another sp.

And run that sp thru agent?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Run Econnect stored procedure from SQL server agent

    Step 1 is to know what are the parameters you need to pass to the stored procedure.  The problem is it is encrypted.  How to know what are the parameters you need to pass ? The are couple of ways you can do this.  The easiest way is to right click the stored procedure and execute.  SQL Server will prompt with all stored procedures parameters it will accept.  Take note of these parameters and execute the stored procedure by passing the params.  

    The parameters can be on input or output type.  The output type parameters (@O_iErrorState and  @oErrString ) will return results where the input will accept values.  This article will help you in executing the stored procedure.  support.microsoft.com/.../262499

    Refer to this link for knowing more about the tacreateemployee  parameters. http://msdn.microsoft.com/en-us/library/ff624012.aspx

     

    Cheers!

    Sanjay

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Run Econnect stored procedure from SQL server agent

    Here you go the Example SQL script  you can use to create an employee record using the tacreateemployee stored procedure:

    DECLARE  @_iErrorState int    

    DECLARE @_ErrString varchar(255)

    exec [dbo].[taCreateEmployee]

    @I_vEMPLOYID ="2050",

    @I_vEMPLCLAS ="CLASS",         -- Class should exist in GP

    @I_vLASTNAME ="Kumar",

    @I_vFRSTNAME ="Sanjay",

    @I_vSOCSCNUM ="000000003",

    @I_vDEPRTMNT = "IT",                -- Dept should exist in GP      

    @I_vJOBTITLE = "ERPADMN",     -- Title should exist in GP

    @I_vUpdateIfExists = 1,

    @O_iErrorState = @_iErrorState OUTPUT,

    @oErrString = @_ErrString OUTPUT

    SELECT  @_iErrorState as errstat , @_ErrString as errstring  --  0 errstat means all ok

    PS:

    1 - Now you can develop your strategy to use it in a SQL agent TSQL job.  

    2 - I have used only the required parameters, for sending additional parameters check my earlier post for reference.

    Verify my response if you like it!

    Cheers!

  • Pandit Profile Picture
    65 on at
    RE: Run Econnect stored procedure from SQL server agent

    Thanks Sanjay.

    I don't want to manually enter the data so,

    I am calling tacreateemployee sp from another SP ex

    Sp1.

    Iam passing the parameter values from Sp1.

    When I execute Sp1, query runs successfully.

    But no corresponding record is inserted in table  upr00100 .

    Iam clueless which table the record is getting inserted?

    Pls help.

  • Community Member Profile Picture
    on at
    RE: Run Econnect stored procedure from SQL server agent

    Can you post SP1 and SP2 ?

    Happy Friday!

    Sanjay

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans