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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Integration Manager - Handling Pop-ups

(0) ShareShare
ReportReport
Posted on by 7,365

I want to run an integration to mass inactivate accounts (GP 10).  However, the e-connect GL Account adapter does not allow for updates, only inserts.  So that leaves the Standard Adapter.  As you may know, if you are trying to inactivate an account through the front end, and it has a balance, it will pop up a warning message "This account currently has a balance, are you sure you want to inactivate it?"

This pop up is killing the integration.

Any suggestions on how to get around this?

Thoughts: 

Use scripts before document to either check if that account has a balance, or just have that script go in and run an update on the GL00100 and set ACTIVE to 0, then let integration manager continue through.  Since this will be a list of all accounts to inactivate, it will see that they are inactive already and skip them (my guess).  Maybe even write to UserDefined1 "Inactivated on "Today""

Some way through the integration scripting that I can turn off that message from popping up.  Can't think of how to do this.

Any suggestions woudl be helpful.

*This post is locked for comments

I have the same question (0)
  • MG-16101311-0 Profile Picture
    26,225 on at

    You can add the window to VBA to answer to the modal dialog automatically for you. Add the Account Maintenance to VBA and use the AfterModalDialog event to anwer to the dialog. When you run IM and since the standard adapter uses the interface to enter data, the VBA customization will kick in each time this modal dialog is displayed.

    Hope this helps.

  • Sunbeam De Jesus Profile Picture
    on at

    K,

    updating table GL00100 and modify the active status of an account is similar to the integration process of inactivating an account, except for in IM there is validation [ such for account with balances].

    therefore if you are certain on the accounts to inactivate and use the sql script, then you dont have to run the integration anymore. which part you mean 'integration manager continue through".

     tnx, S

     

  • K Day Profile Picture
    7,365 on at

    Thanks Mariano.  If I used your solution, that would apply to users across the board though, right?  I want to be able to handle this just for the integration part, but have that message pop up in the front end if they try to inactivate an account.  For example, if I was able to intercept that AfterModalDialog event during the integration and answer it, that would be ideal.

     

  • K Day Profile Picture
    7,365 on at

    S,

    What I am looking to do is have a solution for the end users to repeatedly inactivate groups of accounts.  So this isn't just a one time deal.  What I was trying to say is that if I run the integration as update only, and then make the account inactive in SQL one at a time in the "Before Document" then when Integration Manager gets to that account, it is already inactive and the "update only" doesn't have to do anything.  Again, this is a solution for end users and I see the end result as then running this "Inactivate Accounts" integration and every account they have in the source is inactive, regardless of whether the account has a balance or not.

  • K Day Profile Picture
    7,365 on at

    I think I have found a solution that works.  It is using the Before Document Script on an Update Only GL Account Integration, and I am using the following code.  I am basically updating the Inactive flag in SQL for the Account Number before it decides to do it through the front end.  The result is that by the time it gets to that account, it is already inactive.  Sounds a little silly, but it solves the issue.  I also added a little informational stamp into the User Defined 4 field to say when it was inactivated and by whom.  I might think about putting that in the note field though due to character constrains.

    ' Create an ADO record set.
    Set recset = CreateObject("ADODB.Recordset")

    ' Create the ADO connection to be used.
    Set MyCon = CreateObject("ADODB.Connection")

    ' Initialize the connection string to specify the database.
    MyCon.Connectionstring = "database=" + GPConnection.GPConnInterCompanyID

    ' Call the GPConnection open method that is passing in the ADO connection that you created.
    ' When the connection returns, MyCon will be set to an open ADO connection.
    GPConnection.Open (MyCon)

    ' Create a string to contain an update call to the GL00100.
    updatecommand = "UPDATE GL00100 SET ACTIVE = 0 WHERE ACTINDX IN (SELECT ACTINDX FROM GL00105 WHERE ACTNUMST ='" & SourceFields("Account Number") & "')"

    ' Create a string to contain an update call to the GL00100 User Defined 4 field with an information stamp.
    updatestamp = "UPDATE GL00100 SET USRDEFS2 = 'Inacv " & GPConnection.GPConnUserDate & " by " & GPConnection.GPConnUserID & " via IM' WHERE ACTINDX IN (SELECT ACTINDX FROM GL00105 WHERE ACTNUMST ='" & SourceFields("Account Number") & "')"

    'Run the update commands.
    recset = MyCon.Execute(updatecommand)
    recset = MyCon.Execute(updatestamp)

    ' Close the ADO connection in the typical way.
    MyCon.Close

  • L Vail Profile Picture
    65,271 on at

    Hi KDay (an others),

    Just a reminder that the 'Mass Modify' function available in Cards >> Financial >> Mass Modify will allow you to 'inactivate' a range of accounts without the assistance of SQL. Perhaps not as elegant of a solution, but possible through the User Interface without any special software (other than GP, of course).

    Kind regards,

    Leslie

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans