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)

Trying to get Checkbook ID to default for a Computer Check batch..

(0) ShareShare
ReportReport
Posted on by 5

Strange (or maybe not-so-strange) behavior after migrating a customer from SBF8 > GP2010..

Default Checkbook ID is defined in Setup > Purchasing > Payables, and it defaults in when creating a new batch via Transaction Entry (Origin: Payables Trx Entry), but going through Select Checks creates a different type of batch (Origin: Computer Check) and Checkbook ID is blank - after reading KB Article #871651, it appears that this is typical behavior when both Multicurrency and Bank Rec are registered, although that Article is from the Dyn6 era.

i was hoping that meant i could un-register Multicurrency (an unnecessary module in this case, and a byproduct of the BRL licensing model) and the system would then allow Checkbook ID to retain its default entry from Setup, but that is apparently not the case. i've tried it, and run checklinks on Multicurrency setup tables, and the field is still blank.

is there anything i can do (either file maintenance, manual adjustment in SQL, or something else) to get the Checkbook ID field to default to the pre-defined Checkbook in a batch of Computer Checks?

thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Robyn Profile Picture
    1,753 on at

    Any follow up on this?  I have the same issue GP 2013 R2.

  • Heather Roggeveen Profile Picture
    9,146 on at

    I have never known it to default at all for Computer Cheques.  Probably quite dangerous to default it - that would be very easy to process batches to the wrong Checkbook.

  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Hi,

    Like Heather, I do not remember when it stopped defaulting, if it ever did. I used VBA to read the Default checkbook ID from the PM Setup window and then write the ID to the Batch setup window. Here's what it looks like:

    Kind regards,

    Leslie

    Option Explicit

    Dim cn As New ADODB.Connection

    Private Sub Window_AfterOpen()

       Dim rst As New ADODB.Recordset

       Dim cmd As New ADODB.Command

       Dim sqlstring As String

       If Me.CheckbookID <> "" Then

       sqlstring = "select CHEKBKID from PM40100 where UNIQKEY = 1"

           ' ADO Command

           cmd.ActiveConnection = cn

           ' adCmdText

           cmd.CommandType = 1

           ' Command

           cmd.CommandText = sqlstring

           ' Pass through SQL

           Set rst = cmd.Execute

           If Not (rst.EOF And rst.BOF) Then

             CheckbookID = rst!CHEKBKID

           End If

           rst.Close

       End If

    End Sub

    Private Sub Window_BeforeClose(AbortClose As Boolean)

       ' Close ADO Connection

       cn.Close

       Set cn = Nothing

    End Sub

    Private Sub Window_BeforeOpen(OpenVisible As Boolean)

    ' ADO Connection

       Set cn = UserInfoGet.CreateADOConnection

       'Use a client-side cursor so that a recordset count can be obtained later.

       cn.CursorLocation = 3

       'set the database to the currently logged in db

       cn.DefaultDatabase = UserInfoGet.IntercompanyID

    End Sub

  • Napolo Profile Picture
    766 on at

    Hi Leslie!

    We have converted 4 companies into 1, which have brought in quite a few CheckBook ID's.  I see you have provided VBA to get a default, which would be really great for our AP Team!

    I am sure I am missing something simple, but I am only familiar with basic SQL code.

    I pasted your code in and I am getting an error.  Do you know what I might be missing?  It is showing up as a compile error User-defined type note defined.

    PayablesManagementSetup-Window.png

  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Hi,

    Make sure your VBA code has a reference to the Microsoft ActiveX Data Objects Library.

    I used 2.6. It won't understand the ADO connection without it. Go to References in the VBA Editor and select the appropriate reference.

    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
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans