×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Can I Mark Multiple GL Batches "Ready to Post" Easily

Can I Mark Multiple GL Batches "Ready to Post" Easily

Can I Mark Multiple GL Batches "Ready to Post" Easily

(OP)
I have a client that does not post to their GL regularly. They call on me 2 or 3 times a year to post GL batches and produce financials. Since they always have hundreds of GL batches to post, I'm looking for some method of marking all the batches "Ready to Post" without having to do each batch individually. I cannot find any of the 'common' ways to do this in the UI.

The installed version is Sage 300, 2014.

Thanks,
Howard

RE: Can I Mark Multiple GL Batches "Ready to Post" Easily

Sub MainSub()
'
' Sage 300 Macro file: C:\Data\Macros\make batches post.avb
' Recorded at: Fri Sep 21 16:19:30 2018
'

On Error GoTo ACCPACErrorHandler

Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)

Dim GLBATCH1batch As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "GL0008", GLBATCH1batch

Dim GLBATCH1header As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "GL0006", GLBATCH1header

Dim GLBATCH1detail1 As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "GL0010", GLBATCH1detail1

Dim GLBATCH1detail2 As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "GL0402", GLBATCH1detail2

GLBATCH1batch.Compose Array(GLBATCH1header)
GLBATCH1header.Compose Array(GLBATCH1batch, GLBATCH1detail1)
GLBATCH1detail1.Compose Array(GLBATCH1header, GLBATCH1detail2)
GLBATCH1detail2.Compose Array(GLBATCH1detail1)


Dim GLPOST2 As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "GL0030", GLPOST2


GLBATCH1batch.Browse "BATCHSTAT = 1", True

Do While GLBATCH1batch.Fetch
GLBATCH1batch.Fields("PROCESSCMD").PutWithoutVerification ("2") ' Lock Batch Switch
GLBATCH1batch.Process
GLBATCH1batch.Fields("RDYTOPOST").Value = "1" ' Ready to Post
GLBATCH1batch.Update
GLBATCH1batch.Fields("PROCESSCMD").PutWithoutVerification ("0") ' Lock Batch Switch
GLBATCH1batch.Process
Loop

MsgBox "Done"


Exit Sub

ACCPACErrorHandler:
Dim lCount As Long
Dim lIndex As Long

If Errors Is Nothing Then
MsgBox Err.Description
Else
lCount = Errors.Count

If lCount = 0 Then
MsgBox Err.Description
Else
For lIndex = 0 To lCount - 1
MsgBox Errors.Item(lIndex)
Next
Errors.Clear
End If
Resume Next

End If

End Sub

Sage 300 Whisperer

RE: Can I Mark Multiple GL Batches "Ready to Post" Easily

(OP)
Thanks, Jay. This works perfectly and quickly set 250 batches to "ready to post". Beats wearing out a keyboard!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close