Scripting

  • 1.  Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-11-2025 01:47
    Edited by Dan Burleson 06-11-2025 01:54

    After having successfully distributed an invoice's lines, I am using the "Set oTierDist = oSession.AsObject(oLines.Distribution)" statement to setup a loop through a line's tier distribution records in memory but before the loop can begin "r  = oTierDist.MoveFirst()" gets a zero return code and the "oTierDist.LastErrorMsg" of "The file is empty or does not match filter". This technique works in vanilla 2024 but fails with this message in a 2024 system with ScanForce Mulit-Bin. Has anyone had a similar issue?



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-829-1054
    ------------------------------



  • 2.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-11-2025 06:27

    Nope, but very nice headshot!!!!



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444

    Improving bottom lines for over 25 years!
    ------------------------------



  • 3.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-11-2025 17:10

    I've only done one script with MB, and know there is a different object... but mine didn't have cost tiers.

    I expect there will be a separate object for BinTierDistribution (or something like that) for those distributions.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 4.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-13-2025 12:02

    What @Kevin Moyes said. This is how I did it with Scanco MB Tier Dist object once so yours should be similar:

    Set oTierBinDistribution = oLines.AsObject(oLines.ACS_MultiBin_OBJ)



    ------------------------------
    Alnoor Cassim
    Accounting Systems, Inc. (ASI)
    ------------------------------



  • 5.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-13-2025 12:08

    Tip:  I used the techniques described by David here (to find the right property for creating the bin distribution object):

    https://communityhub.sage.com/us/sage100/f/business-object-interface/126277/is-there-any-way-to-use-the-boi-on-modules-not-created-directly-by-sage/336706#336706 



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 6.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-13-2025 12:47

    That's a fantastic post by @David Speck II and just as fantastic a memory or search result by @Kevin Moyes. Tools for the toolbox (aka EverNote) that I will use today!



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-829-1054
    ------------------------------



  • 7.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-13-2025 12:53

    I have that post copied into our OneNote scripting notes... super handy indeed!



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 8.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-13-2025 12:42

    I found out last night that I was wrong about it being ScanForce, @Kevin Moyes's response would have been what I needed, but it is Scanco's Multi-Bin so your response @Alnoor Cassim is likely exactly what I needed. Thank you (AGAIN)!



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-829-1054
    ------------------------------



  • 9.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-13-2025 17:00

    C'mon @Dan Burleson, what happened to the super hero headshot?



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444

    Improving bottom lines for over 25 years!
    ------------------------------



  • 10.  RE: Anyone See Scripting Conflicts with Tier Distribution using ScanForce Multi-Bin?

    Posted 06-16-2025 01:15
    Edited by Dan Burleson 06-16-2025 01:17

    The AI headshot will return after it replaces me. And it will.

    @Alnoor Cassim The current name for the Scanco MB distribution object is "ScancoMultiBin". Thus, what worked is: 

    Set oInvoiceTierDistribution = oLines.AsObject(oLines.ScancoMultiBin)

    I couldn't have solved it without the reference from @Kevin Moyes, although I didn't think it worked at first because while the window showed the beginnings of the object list. It put the server CPU at 100% indefinitely and the "Copy to Clipboard" button didn't seem to do anything. I tried it on a 2024 Standard system w/ABC company and the clipboard copy gave a completion message after 10 minutes.  I went back to the client's server with more patience, and it finished in just under an hour!

    Thanks folks!

    Oh, this is all in support of injecting /TARIFF lines based on distributed UnitCost less AllocatedCost.

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-829-1054
    ------------------------------