infor.com
concierge
infor u
developer portal
Home
Groups
VISUAL - Enterprise Customer Community
Macro Part Maintenance
unknown
I would like to create macro in Part Maintence that would populate the accounting tab with a certain GL everytime one certain commodity code is chosen. Would also like to require the Product and Commodity code drop downs to be selected On Save.
Find more posts tagged with
VISUAL - Enterprise General Discussions
Comments
unknown
Typically you would use product code to drive the accounting and not override the Inventory Accounting on the part level. Have you looked at that as an option? However, something like this should get you started. You will need to populate the select case with the different commodity code and GL code combinations you want to use and TEST!! You will also want to think about what will happen if someone changes the commodity code which then in turn changes the GL codes and you have inventory on hand. This will really screw up your Inventory Accounting because it would have gone in to inventory with one GL code and then will come out with another GL code.
Name the macro OnSave
If COMMODITY_CODE = "" then
msgbox "Commodity Code is Blank - Can Not Save Part",vbOKOnly
MACRO_SUCCESS = FALSE
Else
End If
If PRODUCT_CODE = "" then
msgbox "Product Code is Blank - Can Not Save Part",vbOKOnly
MACRO_SUCCESS = FALSE
Else
Select Case COMMODITY_CODE
Case "XX"
MAT_GL_ACCT_ID = "XXXX-XXXX"
Case "YY"
MAT_GL_ACCT_ID = "YYYY-YYYY"
Case "ZZ"
MAT_GL_ACCT_ID = "ZZZZ-ZZZZ"
End Select
End If
MACRO_MESSAGE = "Part Not Saved"
Best of Luck,
Scott
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Popular Tags
Infor Lawson Human Resources Group - Discussion
Infor Lawson Technology Group - Discussion
VISUAL - Enterprise General Discussions
Infor Lawson Supply Chain Management - Discussion
Process Automation (IPA) - General Discussions
Pegasus - Partner General Discussions
**General Discussion**
Infor Lawson Supply Chain Group - Discussion
Infor Lawson Financials Group - Discussion
Infor EPM Discussions