- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Can't pull Vendor Div from Manual Check Invoice Detail
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-07-2011 05:20 AM - last edited on 11-07-2011 05:22 AM
4.40 su6.
While doing a GL distribution in AP Manual Check Invoice Detail, I'd like to validate a segment of the GL account based on the Vendor Division No. I can't seem to access the Vendor Div No using either the
oHeader.obj.Getvalue("APDivisionNo$" , ntmp_APDiVisionNo)
nor the
SET oVend = oBusObj.AsObject( oBusObj.GetChildHandle(“VendorNo”))
any ideas?
Solved! Go to Solution.
Re: Can't pull Vendor Div from Manual Check Invoice Detail
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-07-2011 08:34 AM
Hi Brian,
I posted a similar solution to this for Tier distribution: http://community.sagemas.com/t5/Business-Object-In
I think this maybe a good application for using storage variables. I assume you wish to use the vendor for which the cheque is for? So, what I would do is to create 2 scripts. The Manual Cheque header is two levels above the business object you are working in. So, we need to use a common memory space.
So script 1, should be attached to Post-Read and Post-Validate (APDivisionNo) events on the AP_ManualCheckHeader table and script 2 should be attached to Pre-Validate event (if you want to PRE-vent) for AccountKey
Script 1
retval = 0
div = ""
oScr = 0
Set oScr = oSession.AsObject(oSession.ScriptObject)
retVal = oBusObj.GetValue("APDivisionNo", div)
retVal = oScr.SetStorageVar("CurDiv", div) ' store off value
Script 2
retVal = 0
div = ""
oScr = 0
Set oScr = oSession.AsObject(oSession.ScriptObject)
retVal = oScr.GetStorageVar("CurDiv", div) ' retrieve stored division
' {then do whatever your validation is going to be }
Hope this helps
Elliott
Re: Can't pull Vendor Div from Manual Check Invoice Detail
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-07-2011 12:59 PM
That worked like a charm. Many thanks Elliott.


