Stephen Smith's Blog

All things Sage ERP…

About

with 111 comments

I’m a Software Architect with Sage, located in Vancouver, Canada. I’ve been developing software since high school, or way too many years to record. I’ve worked on the Sage ERP line of accounting products for the past 20 years. See http://www.linkedin.com/in/smist08 for more info.

Written by smist08

January 18, 2009 at 12:19 am

111 Responses

Subscribe to comments with RSS.

  1. Hi Smith

    Can i write a VB Macro if its accpac webbased?

    Senthil

    February 7, 2010 at 9:52 am

    • For screens that use the new Accpac 6 web based technology, you won’t be able to run VBA macros in the Browser. You can still run them from the server or from the old Windows Desktop. If you mean the current Accpac 5.x Web Deployed screens, then yes you can use VBA macros, and there is a doc installed with System Manager on how to do that.

      smist08

      February 7, 2010 at 5:45 pm

  2. Hi Steve,

    Hope you are doing well. A quick question for you. Does Accpac publish a Web service for sales tax calculation that is similar to that from Avalara or it relies completely on 3rd party vendors for sales tax calculations? In other words, if I am creating an order from an external interface (APIs) can I query a service in Accpac that will calculate and return in the various sales taxes?

    Thanks

    Hemant

    Hemant Makhija

    February 23, 2010 at 5:18 pm

    • Hi Hemant,

      Hope you are doing well also. We don’t specifically publish a sales tax service like Avalara. But if a customer installed Accpac with Web Deployment and activated web services then they could use our current SOAP web services to access the Tax views to calculate sales taxes. However it would be up to that customer to keep the sales tax rates up to date inside tax services.

      Cheers.

      smist08

      February 24, 2010 at 12:32 am

  3. Hi Steve,

    Great blog! I’m an IT director for a small distribution company (1-10 users) which has used Accpac since the early 90’s but we are considering a competing erp solution due to limitations in Accpac. Is there a link you can provide for more info on features of 6.0, we are on 5.5 right now.

    Thanks

    ACCPACMAN

    July 18, 2010 at 9:46 pm

    • This blog has quite a few articles on 6.0, especially from December and January. What are the limitations that are concerning you the most?

      smist08

      July 18, 2010 at 11:00 pm

      • Primarily, it is the following:

        1. Limited built-in reporting capabilities with steep learning curve for custom reporting (ie: Financial Reports).

        2. Inflexible and inaccurate inventory management.

        3. Lack of built-in module / integration for RFQs with OE. This is crucial for a distribution company.

        4. On a related note, there is also the high cost of maintenance and upgrading core software and related custom applications (VB apps).

        Thanks for listening.

        ACCPACMAN

        July 19, 2010 at 1:01 am

      • Thanks for the comments. Feedback is always very useful and greatly appreciated. Just a couple of notes on a couple of upcoming things that might help you:

        1. With 6.0A we are adding a very very simple to use Inqiry/Reporting tool which I talk about in: http://smist08.wordpress.com/2009/12/11/sage-erp-accpac-6-0-adhoc-query/. With Accpac 5.6A we also introduced the Accpac Intelligence reporting product that you might want to check out.
        2+3. I don’t know of any changes that affect these areas.
        4. I think when we have completed the transition to becoming a full Web application this will be much better. Installations only happen on the web server and customizing the screens is much easier. Plus improving total cost of ownership is a major initiative going forwards.

        smist08

        July 19, 2010 at 2:34 am

      • I think your post on adhoc query hit the nail on the head. Also, there was a lot of other great info on the page you referenced about SageCRM, OE and the Portal.

        Look forward to trying out 6.0!

        Keep up the good work.

        ACCPACMAN

        July 19, 2010 at 3:51 am

  4. Hi,

    could you help me on this issue?, actually i want to create Balance Sheet, P&L and Trial Balance, Based on From Date and To Date Parameters not based ob Fiscal Period, i have crated Balance sheet using “GLPOST” able, but i m unable to give proper output. how to modify the FR report?,

    Thanks in advance.
    Nava Deeban S

    Nava Deeban S

    August 18, 2010 at 1:11 pm

    • I’m not sure how to do this with regular FR since it always takes fiscal year/period as its input parameters. However, you might have a look at the new balance sheet and income statement crystal reports that are run from the new G/L data snapshots in the Accpac 6.0A Beta Web Portal.

      smist08

      August 19, 2010 at 1:58 am

  5. Hi Stephen,

    Is there there an open beta for 6.0A or is it closed? I would be very interested in trying it out in our environment.

    Thanks

    ACCPACMAN

    August 19, 2010 at 2:11 am

  6. You have some really interesting material here. Would you allow us to use some of it in our Accpac customer newsletters, acknowledging you as the author?

    Thank you

    Howard

    September 16, 2010 at 6:03 am

    • Sure that would be fine. What I really like is if you can provide URL links back to this blog.

      Thanks.

      smist08

      September 16, 2010 at 2:57 pm

  7. Dear stephen,
    I am trying to create a subclass view using SDK, i followed the same steps, as in SDK document, when i compile, i am getting errors as follows…
    can i get help on this?
    —————————–
    TTAPPJH1.h(430) : error C2059: syntax error : ‘}’
    TTAPPJH2.h(748) : warning C4013: ‘TTAPPJH_IDX’ undefined; assuming extern returning int
    TTAPPJH2.h(748) : error C2065: ‘TTREF5′ : undeclared identifier
    TTAPPJH2.h(748) : error C2057: expected constant expression
    TTAPPJH2.h(749) : error C2057: expected constant expression
    TTAPPJH2.h(749) : error C2229: struct ‘tagV’ has an illegal zero-sized array
    TTAPPJH2.h(751) : error C2229: struct ‘tagV’ has an illegal zero-sized array
    TTAPPJH2.h(1182) : error C2057: expected constant expression
    TTAPPJH.C(971) : warning C4034: sizeof returns 0
    TTAPPJH.C(1535) : error C2065: ‘TTAPPJH_IDX_COUNT’ : undeclared identifier
    —————————–

    Ramkumar

    December 2, 2010 at 2:37 pm

    • Hard to say exactly. It looks like there are some problems in your ttappjh.tbl file that are causing syntax errors when the *.gen files are being compiled. Perhaps have a look at line 430 in ttappjh1.h and see what’s being referenced there and then see which are causing the errors.

      smist08

      December 2, 2010 at 3:49 pm

  8. Hi Steve,

    How are you? Hope you are doing well.

    Work Environemnt:
    Citrix Box
    Sage ERP Accpac 5.6A
    Windows 2008 R2
    MS SQL Server 2008 R2

    We have a custom module developed using SDK activated for Accpac with the above environment for a customer. Customer will not give admin/power user access to users for various security reasons.

    The issue here is as a normal user he is unable to access the custom module but can access Accpac. Please give us a workaround or what am I missing here? is there any solution for this issue.

    The custom module works fine only for the admin user who installed the program in the citrix box and doesn’t work for other users.

    What is the fix to this issue other than giving admin/power user rights to the users. How does accpac works for users other than admin and not for the custom module developed fully using Accpac SDK.

    please let me know the issue that stops the custom program to work for other users? do i need to do anything during the install of the custom program? if so, what is the fix?

    Thanks,
    Krish

    spkrish

    August 6, 2011 at 5:32 am

    • Usually you need to assign that user to admin, then run regacc, then reassign them back to being a normal user. This process will register any ActiveX controls that need registering. If your custom solution has any additional controls that Accpac may not know about, then register these also while they are administrator.

      smist08

      August 6, 2011 at 4:01 pm

      • Hi Steve,

        Hope you are doing well.

        Your suggestion worked fine. However, I will have to do this manually at client’s environment. I wanted to know if this has to be done during the setup of my custom program.

        Thanks a lot.

        Krish

        spkrish

        September 9, 2011 at 3:07 am

      • If you have any ActiveX or COM controls that need to be registered, then yes, you will need to do this.

        smist08

        September 9, 2011 at 3:34 am

  9. Thank you very much Steve.

    I shall try this and will let you know the feedback.

    Thanks,
    Krish

    spkrish

    August 7, 2011 at 4:56 am

  10. Hi Steve,

    Topic: Accpac datasource Clone.

    I have situation where I wanted to know if I shall use datasource clone to achieve it.

    Situation: Custom program will refreshdata from a view into Accpac viewlist. I have an option in the header to choose costing method (Average, Most recent & Standard) from a dropdown list. When user chooses any one of the costing method, the custom program will have to pick the appropriate cost from I/C location details and populate it in one of the viewlist column. (This column will have a cost already generated in view and custom program will allow user to change the cost by choosing the appropriate costing method)
    This view is a flat view and It is not defined as “Revision List” hence whenever a value is put in and program moves out of the row the value is saved into the view (db table).

    Issue: To populate the cost in the viewlist the custom program will have to update the datasource (in the DB table) with the cost and do refreshdata to reflect it in the viewlist. User may change the header costing method option any number of times.

    Update the cost in the datasource (DB table) and refreshdata seem to be a bad idea bcoz the user may choose some costing method and close the UI however, the cost will be updated by the custom program which is not be the ideal requirement.

    Shall I use the cloned datasource to show the cost values populated and then once user hits a save button then save it back to the original datasource? please advise if my understanding with the datasource clone is not correct.

    Please suggest the right away to handle this situation.

    Thanks,
    Krish

    spkrish

    September 9, 2011 at 12:07 pm

    • I tend to think you should set it up as a proper header detail set of views. Then it will use revision lists. If you don’t do this, then you are always going to be fighting table out of sync problems. The key point of a header detail view set is that when you save the header, it saves the header along with all the details in one database transaction, so things never get out of sync, it always save everything or nothing.

      smist08

      September 9, 2011 at 3:42 pm

  11. Hey Steve,
    Just wondering if you or your team have done any testing with Accpac running over VMWare View or ThinApp? Terminal Server and Citrix is unfortunately not an option with an existing client expanding. All their App servers are already virtualized with VMWare.

    Thanks

    Awie

    Awie van den Berg

    October 5, 2011 at 9:32 am

    • We do support and test with the VMWare ESX environment. The official word from customer support is that this is all they support. I’m not directly familiar with View or ThinApp, but if these are part of ESX then they might support you.

      smist08

      October 5, 2011 at 5:21 pm

  12. Hi Steve,

    I am getting classic error “Session Could not be opened”

    Sage ERP Accpac Version : 55A
    Operating System: Windows XP

    There is a custom program VB6 EXE. I have written the below code to create a session. I get the error “Session could not be opened”

    Please let me know what could be the cause of this error and how to fix it.

    Thanks,
    Krish

    ==============================================================================

    Dim lSessMgr As New AccpacSessionMgr
    Dim strObjectHandle$, lSignOnID&

    Dim oSession As AccpacSession
    Dim oDBLink As AccpacDBLink

    strObjectHandle = “”
    lSignOnID = 0

    With lSessMgr
    .AppID = APP_ID
    .AppVersion = APP_VER
    .ProgramName = PGM_NAME
    .ServerName = SERVER
    .ForceNewSignon = True
    .CreateSession strObjectHandle, lSignOnID, oSession
    End With

    Set oDBLink = oSession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)

    spkrish

    October 14, 2011 at 5:57 am

    • As a first step, try removing the .ServerName= line, since this is only for web deployed.

      smist08

      October 14, 2011 at 3:52 pm

      • Steve, I have removed the ServerName= line, still am getting the error.. please advise

        spkrish

        October 15, 2011 at 5:11 am

  13. Steve, I have removed the ServerName= line, still am getting the error..
    Please let me know is there anything am missing.

    spkrish

    October 15, 2011 at 5:36 am

    • Here’s some code I have lying around:

      Private mSignonMgr As New AccpacSignonManager.AccpacSignonMgr
      Private mlSignonID As Long

      Private mSessionMgr As New AccpacSessionManager.AccpacSessionMgr
      Private mSession As AccpacSession

      mlSignonID = -1

      mlSignonID = mSignonMgr.RegisterSignon(Me.txtUserID, Me.txtPassword, Me.txtDatabaseID, “”, Date)

      With mSessionMgr
      .AppID = “XX”
      .AppVersion = “55A”
      .ProgramName = “XX9999″
      End With

      mSessionMgr.CreateSession “”, mlSignonID, mSession

      Set mDBLinkCmpRW = mSession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)

      smist08

      October 15, 2011 at 11:31 pm

      • Hi Steve, Using the above code in VB6, I get an error “The session is not initialised”. Runtime error -2147467259 (80004005). The code does not go past this point Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE).

        I am using V62A database.

        Ian Booth

        August 21, 2014 at 11:06 am

  14. Hi Steve,

    I am just wondering if there is any documentation wit regards to the use of the ACCPAC .Net objects and more specifically the security requirements around using those in an ASP .Net environment.

    I have managed to figure out most of the issue and everything works fine in my developement environment however as is typical when deploying to the live environment i have errors and they occur when the code hits the init of the ACCPAC session with and access denied error.

    The only time it works in the live environment is if i am logged on as an admin user.

    Thank you.
    Duncan.

    Duncan Campbell

    November 29, 2011 at 6:42 am

    • Tech support may have some notes on this. The documentation tends to be on how to connect from a regular .Net program. Generally, by default, running under IIS, a user has very limited access rights. You have to grant them sufficient rights to call .Net assemblies and COM objects. Then if the program files or shared data is located on a different computer than the IIS server, then you need to assign them to a user with domain network rights or they can’t access the files on the other file server.

      smist08

      November 29, 2011 at 10:52 pm

  15. Is there somewhere I can find the definitions of the tables and or what the values would mean in the various tables. I am trying to do some reporting but I am struggling with ensuring I have the right values. I am looking for things like Batch Type, account type, trans type, etc …

    Katherine

    February 7, 2012 at 5:24 pm

  16. Steve,

    Is there a way to get the Accounts Receivables view in ERP 6.0 published in Sage CRM 6.2? Customer very reluctant to move to 7 due to a highly integrated CRM deployment. Thanks.

    Gopi

    Gopinath Narayanan

    February 28, 2012 at 11:21 am

    • Not sure what you mean. The A/R integration pieces haven’t changed much. There are CRM pages that show A/R information as well as having the ability to drill down to A/R screens.

      smist08

      February 29, 2012 at 1:52 am

  17. Steve,

    We are in the process of prototyping SData to write an interface to 6.0A from our Retail Manager solution. It has taken a while to get something working (we are new to SAGE and 6.0A so this has been a big learning curve for us) and your blogs have been a big help so far so thanks for that.

    Using the customers, we are now able to process customer records through the all CRUD stages. We do have a few questions and concerns and hope that you could assist. Our plan was to focus on our interface to SAGE using SData for 6.0A but we are a bit concerned that we may not be able to address all of our requirements. Our main requirement at this stage is to be able to write data back to 6.0A for customers, items, sales orders, inventory transactions and bank transactions but we are struggling to find how to achieve this. We also need to read data back and this seems to be easier to achieve.

    So, a few questions:
    * We can see that customers, items and oe are able to be inserted (and maintained) via SData but cannot easily identify (not sure where to look) whether the adding of Bank and Inventory transactions are supported as well.
    * One of your examples demonstrated a customer insert where you had a sample XML layout for the customer data. This sample did not use all of the columns and we would like to know where we could get the info that identifies all of the the columns that could be included for an insert operation for the various tables (primarily customers, items and sales orders at this stage). We tried using the ..\customers\$schema call for this , but it it does not appear to identify all of the columns that are able to be inserted for a customer (eg: TEXTSRE1,TEXTSRE2 etc are not listed) – or are we missing something.
    * We can’t see any way to add bank and inventory related transactions via SData. Is this possible? If so, where do I find this info as well.
    * How can we find a full list of supported CRUD operations on the 6.0A version.

    Thanks.
    Peter.

    Peter Brooks

    March 13, 2012 at 8:01 am

  18. Hi Steve,
    I have been reading some of your articles, and find them well written and easy to understand. I wonder if you can help me with an issue. We are running Accpac 6 on a server client basis with SQL. I run crystal reports on my workstation, and am trying to create a custom payroll report, with much of the information found in the CP Check Register report. This includes various earnings and various deductions, including the tax. I noticed that Sage uses a datapipe dll to create their out of the box report. Is there any way I can use this same datapipe to create my custom reports? When I try to use it, I get a “database connector crdb_p2bpipe.dll could not be loaded” error.

    Thanks
    Tony

    Tony

    March 21, 2012 at 5:05 am

    • You can, but I think its fairly difficult. You need a section in the CPRPT.INI file similar to the ones for the existing report. It might be easier to backup and then modify the existing report, test it by running it from the regular UI, then when you are done rename it and create a section in CPRPT.INI for it, then restore the original report. The good news is that we are currently working to remove all the datapipes from Payroll.

      smist08

      March 21, 2012 at 4:58 pm

  19. Hi Steve

    I would appreciate if you could let me have the “official” process to move Accpac V6.0 & Pervasive V11 installed on a Windows 2008 R2 server to a Remote Desktop VM server.

    Accpac Fanatic

    nadema

    April 3, 2012 at 7:35 pm

    • I don’t know if there is an “official” process, but I would install it on the new server and get running with Sample data. Then with all the users out of the system, copy the shared data folders over and point database setup at your production database, then depending on whether you are using Terminal Server or Workstation setup, switch all the users over to the new server (possibly by running workstation setup again).

      smist08

      April 3, 2012 at 8:54 pm

  20. Hi Steve,
    Have a client on Accpac V6.0 which has branches in Egypt.
    They use the screens in English, but want some of the fields to contain arabic language so that they can be printed on forms and reports.
    I have set up the WS to allow arabic.
    I can type in the arabic language on a screen, but when I save it, it changes to ?????????
    I have checked the SQL table and that also contains ????
    I changed the field in SQL and typed in the arabic characters – SQL does not change these characters.
    On the accpac screen this field shows as ????
    On a crystal report this prints in arabic – so the SQL is okay – it is just the Accpac side of things.
    I have spent time on the forums and Sage site, and have tried all suggestions, but to no avail
    I have been troling the web for help and came across you so I really hope that you have the answer for me.
    much appreciated.

    Ian Lowe

    May 24, 2012 at 9:21 am

    • From the control panel, choose “Region and Language” then from the Administrative tab, change the “Change system locale…” to select and Arabic language.

      smist08

      May 24, 2012 at 3:16 pm

  21. Hi Steve,
    Thanks – this worked a treat – much appreciated.

    Ian Lowe

    May 25, 2012 at 8:57 am

  22. Hi Steve,

    In March 2012 we asked a question about development access to AccPac ERP via SDATA and you provided a response and your suggestion was that we join up as a development partner. Well, we have done so and have eventually received our login details with no indication of where to access different bits of info. I have requested additional info but it may be quicker to ask the question here. So, could you please point us to the different areas that we are able to access the development SDK as well as the various forums that may be available – in particular for development using SDATA.

    Thanks,
    Peter.

    Peter Brooks

    August 19, 2012 at 8:41 pm

  23. We have made a fair bit of progress with our SData interface but it has not been without a very steep learning curve and associated frustrations. Unfortunately we have now hit a wall and hopefully you can provide some assistance. Basically our aim is to have all transactions generated in our Retail solution transferred across to Sage AccPac 6.0A. We have managed to load our invoices using the SData oeorders resource but are having the following frustrations:
    * the entry added via oeorder is auto shipped (qtyorder=qtyshipped) but, even though we specify an override invoice number, invoice date and ship date and select the appropriate fields eg INVPRODUCE etc, these are ignored and the system generates its own invoice number. Should this work?
    * if we wanted to do add the oe in 2 phases, oe added first and then a second process that does the Ship All, how could we do the Ship All process via SData. Are there any examples? How would I create a OEOrderShipAll resource.
    * we need to add AR Receipts via SData and again we can’t see any examples on how we could use this or what resource we could use.
    Could we assume that we would need to identify the views that would used to process these transactions and then create a resource with the appropriate views linked and the resourceviewFileds included or excluded. If this is the method, is there any other info available on this. The blog you provided recently on this was a good intro but I can’t find anything further about this. Am I missing some help info or docs!

    We also had an issue with a new AccPac 6.0A install. Once completed, when we tried to access the SData portal, we received an error indicating that the class com.sage.accpac.swt.sagecrmorderui.server.OEOrdersResourceKind could not be found. I had a look in the oe classmap.xml file and noticed that most of the other resources referred to the com.sage.orion.sdata.servlet.accpac.ViewResourceKind class. So, I changed the oeorders class to point to this class and the system seemed to work ok. So, what is the difference between the 2 classes and have I caused a potential problem by pointing to the base class.

    Really look forward to a response and some pointers.

    Thanks,

    Peter.

    Peter Brooks

    September 6, 2012 at 9:55 am

    • Hi Steve,

      Does Accpac 5.6A works in VMware VDI? How is the “access” speed like? If slow, what advice will you give? Thanks for your help!

      jen

      February 13, 2013 at 12:08 pm

      • I haven’t used VMWare View (VDI), we use VMWare ESX. But we’ve always had good experience with VMWare products. I suspect it will work well. The main thing is to ensure the desktop sessions have enough memory and then I think they should work well.

        smist08

        February 13, 2013 at 4:34 pm

  24. Hi Stephen – We queried our network of BPs searching for knowledge/practical experience running Sage ERP Accpac on Microsoft Azure. We have an existing client who wishes to deploy in that environment. Unfortunately, we have not received a reply and our client was hoping for a quick response. Can you offer any comments that it will not be an issue for them?

    LisaC.

    February 28, 2013 at 7:50 pm

    • Not yet. I blogged on how to run Accpac from the Amazon cloud here: http://smist08.wordpress.com/2010/12/17/accpac-on-the-amazon-cloud/. However to run Accpac in Azure will require a feature called “Persistent VM”. This feature is only in preview mode and until this is available for production you wouldn’t be able to deploy Accpac to Azure. This feature allows the virtual machine to save changes when it is restarted. Also you can’t currently use Azure-SQL with Accpac since there are some problems. We are working around the Azure SQL problems but won’t support this until either our 2013 release or sometime after that. However you can install regular SQL Server in your Azure Persistent VM and run that way once persistent VMs are released (sometime this summer probably). Hope this helps.

      smist08

      March 1, 2013 at 12:52 am

  25. Hi Stephen – I’ve written a lot of code and custom integrations for Dynamics GP (using the eConnect API’s), Dynamics AX (using MorphX/X++), Dynamics CRM, SL, etc., but I haven’t worked with Sage 300 until now. I read the article “To SDK or Not to SDK” you published on the R&D Team Blog. I’m working on an app that will extract data from Sage 300. Data extraction shouldn’t be overly difficult. However, there will also be inbound transactions that I will need Sage 300 to consume. There is no need to modify the Sage UI. I am trying to write this app so as to be the least intrusive as possible. That said, I’m also assuming the Sage 300 user/client is unsophisticated (ie they’re not running CRM, no IIS/Apache/Portal, etc.). So, assuming this app will run locally along side of the Sage 300 client, it sounds like using the .Net interface is the way to go. If I was going to write this app for GP, I’d have the client install eConnect and the inbound eConnect service. Then, I’d write a service in C# using the eConnect API, hydrate the object that is the subject of a tranaction (say, for example, a sales order invoice), then submit. Does Sage have a similar toolset? Do you think using the .Net interface is a viable option? Any advice you can provide will be greatly appreciated.

    stevebredall

    March 14, 2013 at 10:12 pm

    • Using our .Net interface is a good way to go. You only need the regular Sage 300 workstation setup installed, then you have most of the APIs available to you including .Net and COM. You don’t need anything like eConnect. Then you just need to login and use our views via the API to retrieve and push data. The SDK has a number of samples usually installed in c:\pluswdev\samples\dotnet.

      smist08

      March 14, 2013 at 10:18 pm

  26. Hi Steve

    I’m kindof at a loss here and I hope you can offer some advice – I have used this technique successfully for years now – and suddenly it’s causing a problem.

    I have developed a simple VB.NET console application that references the Accpac COMAPI. It simply creates a quote in OE.

    My laptop has the visual 2010 environment and I have a 2008 server that has Sage 300 ERP installed. I ran the WSSetup on my laptop to get access to accpac and the API on the server. I compiled, installed and ran the program on my laptop and the program works as expected. (each time I run it a new quote gets created)

    However when I install the program on the 2008 server where Sage 300 ERP is installed, the “session.init” fails and I get an error as follows

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: quoteconsole.exe
    Problem Signature 02: 1.0.0.0
    Problem Signature 03: 5164bd7a
    Problem Signature 04: QuoteConsole
    Problem Signature 05: 1.0.0.0
    Problem Signature 06: 5164bd7a
    Problem Signature 07: 13
    Problem Signature 08: 128
    Problem Signature 09: System.InvalidCastException
    OS Version: 6.0.6002.2.2.0.274.10
    Locale ID: 1033

    My startup code looks like this

    Private mysession As AccpacCOMAPI.AccpacSession

    Sub Main()

    Try
    mysession = New AccpacCOMAPI.AccpacSession

    mysession.Init(“”, “XY”, “XY1000″, “61A”)

    mysession.Open(ACCPACUSER, ACCPACPSWD, ACCPACDATABASE, Today, 0, “”)

    I am confident that the session.init is failing because I put trace statements in the code after every line and I never got to the trace line after session.init.

    Do you have any ideas for me. Much appreciated.

    John

    John Todd

    April 10, 2013 at 2:00 am

    • Strange that its an InvalidCastException. Hard to see how passing in four string constants could cause this. You might try opening up the SDK sample in c:\pluswdev\samples\dotnet\vb-Net and see if it has the same problem.

      smist08

      April 10, 2013 at 3:44 pm

      • Oops, sorry I was thinking of the .Net API rather than the COM API. For the COM API it might be something about how its defined and then the cast is object.method or something.

        smist08

        April 10, 2013 at 3:49 pm

  27. Thanks Stephen. I went on to use the Accpac spy to monitor the COMAPI Session and according to it the session object was not even being created – so I brought the DIM into the Main sub and at least then the session object was being created but it still failed on the init. Unfortunately I ran out of time and decided to write the code in VB6 which works well. Thanks for your time on this.

    John Todd

    April 11, 2013 at 11:41 am

  28. Great resource — keep up the excellent knowledge share

    David Beard

    April 23, 2013 at 4:25 am

  29. Hi Stephen

    I’d like to ask few questions about BI but at this stage I’d like to ask private question if that is an option.

    Grega

    Grega Loboda

    July 26, 2013 at 12:23 pm

  30. Hi sir,

    I would like to ask assistance. i found it hard to insert an order to an Sage 300 ERP :-(
    the samples on the http://interop.sage.com/daisy/sdata/CreateOperation/Example.html gives me an error when i tried it on the Mozilla Rest Client ( ‘The property ‘orderDate’ provided in the payload is not a property of the ‘oeorder’ resource.’ ) and ‘SDataBadPayloadPropertyNotKnown’ error
    i’am completely stuck with this. I just need to insert an order to the Sage 300 ERP.

    Hope to hear from you sir.

    Thanks a lot.

    regie

    October 4, 2013 at 7:01 am

  31. Hi Stephen,
    I read your blog on customizing the order screen in crm (http://smist08.wordpress.com/2010/12/11/customizing-the-order-details-in-quote-to-orders/). I was able to add a few new fields to the Customer Details tab and it works great however when I save the order and it posts back the 2 new fields show as editable. What I’ve determined is that it seems like it’s based on the id of the widget. If I rename the orders_DESC widget to orders_FOB and rename the orders_FOB widget to orders_DESC then the Description shows as editable and the FOB field shows as read only. Do you know what would be causing that? Thanks Stephen.

    Brad

    October 9, 2013 at 1:08 am

    • One limitation of this way of customizing is that you don’t get the read-only/editable state change logic. So the custom added fields are always editable. Generally this isn’t too much of a problem since you can see from the rest of the form not to expect to edit them. I think your renaming is just replacing some of the existing fields and inheriting the builtin logic behind them.

      smist08

      October 10, 2013 at 6:39 pm

  32. Hi Stephen.

    I am writing an interface to the sage desktop using the vb .net framework 4.5 in visual studio 2012. I would like to use the accpacfieldedit control, but get an error whenever I try to access the accpacdatasource:

    system.IO.FileNotFoundException
    {“Could not load file or assembly ‘Interop.AccpacCOMAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.”:”Interop.AccpacCOMAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”}

    What am I missing? Thanks

    Robert Braunlich

    November 5, 2013 at 6:53 pm

    • If you are interacting with our COM controls then make sure you use all COM controls and don’t use the Sage 300 .Net API since this isn’t compatible with all the COM stuff. The error you are getting looks like it can’t find our COM API. Perhaps the runtime folder isn’t int he PATH or you need to run regacc to get all the controls registered properly. Make sure you can run the UIs from the regular Sage 300 desktop.

      smist08

      November 6, 2013 at 1:17 am

  33. Hello Stephen,
    Thank you for your helpful blog.
    We are using Sage accpac since v5.5. We used it at our factory. and currently using v5.6. We have many problems by Day end process. it take a long time.
    We run it 3 times a day. and it stop our process 15 mins each time. from last week we enable lot tracking. it face us a big problem, day end process increase to 50 mins each time. ( We used a high performance server/hardware and there is nothing we can do on our server setting)
    Would you please help me :
    1- is there any way to we rollback and disable lot tracking ?
    2- is there any suggestion to decrease Day end process time? ( I read your article on your blog and we test that setting we use costing during posting)
    3- If we upgrade to v 6, is there any improvement on Day end process? we have a lot of customization so we are not happy to upgrade to new version while we not sure about performance improvement .

    Best regards,

    Mehdi Alidoost

    November 11, 2013 at 6:43 am

    • A lot of time people run day end frequently to update costing. If you choose the costing during posting option in the applications, then costing will be kept up to date without running Day End. Then you can run Day End once a day (at night) and it won’t have to do the costing part either.

      smist08

      November 11, 2013 at 10:43 pm

      • Thank your for your reply, Is there any changes in new version about Day End process, If we upgrade will we have better process performance?

        Mehdi Alidoost

        November 12, 2013 at 6:50 am

      • It would depend on what your problem actually is. We do take performance problems seriously and there are always improvements in each new version (even each product update). But for your situation, it might be worth setting up the new version on a test system and giving it a try.

        smist08

        November 12, 2013 at 4:54 pm

      • We need consulting service on our case, Main problem is performance. We have to upgrade to sage x3, or we can upgrade to new sage 30?. We did many customization, and migration to X3 is difficult decision. Would you help us on this case or would you introduce consultant to me. ( I want some one check our system, db ,… and tell us new version of Sage 300 can help us or not)
        Regards,

        Mehdi Alidoost

        November 16, 2013 at 8:09 pm

      • Partly it depends on where you are located. You cloud start with your Business Partner or contact Sage Customer Support directly. One company that has helped clients with performance problems is Tairox (http://www.tairox.com/). But I don’t know what logistics would work for you.

        smist08

        November 17, 2013 at 5:53 pm

  34. Hello Stephen,

    I encounter some problems when using macro in vb6. Hope you can guide me to the correct direction.
    1. Macro create journal fail, because no value in optional field. Although the optional field has been set to not required.
    2. Auto create CN fail, because item inventory cannot be negative. CN should be adding stock.

    Thank you

    Michael Kok

    November 15, 2013 at 6:14 am

    • I would try macro recording these operations from the regular UIs and compare what you get with your code to see if you are missing something. It might be you just need to compose some more Views or need an extra process call.

      smist08

      November 15, 2013 at 5:00 pm

      • Dear Stephen,

        Thank you for your kind reply.

        1. I actually copied a recorded macro from Accpac, but using different version 5.4A. In production we are using Accpac 6.0A. However I did change all the declaration. Not sure whether this is the reason.

        2. For this I also use recorded macro from Accpac. From UI screen everything works, but when I play the macro, it shows the same error message.

        Michael Kok

        November 18, 2013 at 3:05 am

      • Not sure what’s going on with the optional fields, but for the CNs:

        Reason why you cannot create CN – The item is at negative inventory level but IC doesn’t allow negative inventory, therefore the system tightly controls the situation by not allowing any transactions on the item, even if the purpose of CN is to replenish the stock. The workaround:

        – Turn on “Allow Negative Inventory” in IC Options
        – Post the CN to bring the inventory back to above zero
        – Restore the system by turning off “Allow Negative Inventory” in IC Options

        smist08

        November 19, 2013 at 2:46 am

  35. Thank you for the suggestion. That is how we had adviced our customer as temperory solution. But they insist on a better long term solution.

    Michael Kok

    November 19, 2013 at 3:50 am

  36. Hi Stephen,

    I’m a application developer that has a client that wants to integrate into Sage 300 ERP. What are the API or Web Service options. The Sage site is strangely not forthcoming about what would seem to be important information about integration that any developer would need to create a realistic cost proposal for this type of work. Thanks for you attention in advance.

    J. Sciarra

    December 10, 2013 at 4:47 pm

    • Perhaps have a look at this article: http://smist08.wordpress.com/2010/10/30/to-sdk-or-not-to-sdk/. Generally the COM API or .Net API are the recommended way to go. These APIs can do anything in the system. There are Web Services interfaces with SData but the API is only on a subset of the system so you could get stuck depending on what you are trying to do.

      smist08

      December 10, 2013 at 4:51 pm

  37. Hi Stephen,
    Just started getting “A Session Cannot Be Started” error when trying to connect to ACCPAC through IE. Also, our CRM database won’t connect, yet ACCPAC ERP connects fine. Also, when i try to go to accpac/help (or any site under the ACCPAC Website) i get 403 – Forbidden Access is denied. I believe this is an IIS issue, but cannot find anything wrong. Where should I start? Very Novice at SAGE. Thank yo so much in advance.

    j maxwell

    January 21, 2014 at 5:19 pm

  38. I am using .net remoting, and ports are open. It sees the database and asks for a log in. It doesn’t matter what log in i use, it replies “a session cannot be opened”

    j maxwell

    January 21, 2014 at 5:43 pm

    • You may have to contact customer support on this one. Or you could try the COM Spy program that is in the tools under Sage 300 from the Start Menu. Try spying on different things to see if you can get a more helpful error.

      smist08

      January 21, 2014 at 11:45 pm

  39. Hi Stephen, I’m just wondering is there a way to do a single sign-on into Accpac (Desktop or Web Deployment) from another app, so the Accpac login screen will not show up?

    DakoChan

    March 21, 2014 at 3:55 pm

  40. Thank for your reply, Stephen. I understand from your reply that we can pass the $objecthandler into another app, so it doesn’t need to show Accpac login anymore. But, how about the other way around? Login into an app and then the app passes the login credential into Accpac, so Accpac Desktop will not show its login screen anymore. Thank you in advance.

    DakoChan

    March 23, 2014 at 4:22 am

    • Sorry but there aren’t sufficient command line arguments to the desktop to stop this.

      smist08

      March 23, 2014 at 4:10 pm

      • Thank you for your reply, Stephen. Please continue your good job.

        DakoChan

        March 24, 2014 at 2:32 pm

  41. Good afternoon Stephen,

    I am having a hard time wrapping my head around user permissions. The fact that two calls to support 3 months apart yielded two different answers is adding to the fog.

    We are using ERP 6.1. One support person told the that if I want users to have entirely different security profiles from one company to a ‘new one’, that I had to set up a different SYS database for the new company. The second support person said that users are universal to ERP 300 and that the SYS database doesn’t play any role.

    Replicating up from one database and back down to another database doesn’t seem to have any effect on permissions which seems to contradict the first support call and importing User Authorizations from one company to another can trigger an ‘user ID is invalid’ error message which seems to contradict the second support call.

    Can you point me to an article that sets it clear?

    Tkoctal

    May 16, 2014 at 7:06 pm

    • This article might be of some help: http://smist08.wordpress.com/2013/04/20/user-roles-and-security-in-sage-300-erp/. Security Groups will be transferred through the system database so you can share these. User Authorizations are by company, so they won’t be. You can still have completely different security rights by company when sharing the same system database. When you sync both will have the same security groups available to assign, but you can assign different security groups to each user in each company. Another mechanism to copy the user authorizations from one company to another is to export them, change the company in Excel and then import them to the new company.

      smist08

      May 16, 2014 at 8:47 pm

      • Thank you for your quick response.

        Tkoctal

        May 22, 2014 at 2:15 pm

  42. Hi Stephen,
    I am following you ACCPAC articles , it is all are very use full, and resolving lot of issues which we encounter on our real world.
    I came up with the different issue this time.
    We developed a WEBSERVICE to cater the integration with ACCPAC AR module. Customer is having 15 user licenses but some times all 15 is been consumed by users and our web service is not be able to process properly.
    Is there any that available to keep one user is dedicated for web services?
    If so please let us know ASAP? We almost deadlocked by customer on this request..
    Thanks.

    Parthi

    June 16, 2014 at 2:46 am

    • I think the only way is for your web service to keep a session open, then it will keep the lanpak while it runs.

      smist08

      June 16, 2014 at 2:42 pm

      • Thanks for the information Stephen..!!

        This is a REST service , So we don’t have the session to keep the ACCPAC session open

        I can remember , in earlier version’s of ACCPAC we use IAP user for the integration, which doesn’t have this kind of issue.

        Please take this as a request for the new ACCPAC version release ! Accommodate some mechanisms in which we can dedicate one user license only for the integrations.

        Parthi

        June 16, 2014 at 11:44 pm

  43. Hi Stephen, I’m trying to complete transit transfers and transit transfer receipts with the API (c#). I can do regular transfers no problem but there appear to be some subtle differences with transit – is there any chance you could post a sample or link something that would get me closer please?

    Regards,

    Jon

    Jon Embrey

    June 18, 2014 at 1:58 am

    • I don’t happen to have anything handy. Usually RVSpy and/or macro recording the standard function can help.

      smist08

      June 18, 2014 at 3:20 am

  44. hi Stephen,

    I got a problem to integrated with ACCPAC V5.6, here is the error message “Could not load file or assembly ‘Interop.AccpacCOMAPI’ or one of its dependencies. An attempt was made to load a program with an incorrect format.”.

    I created a webserivce to call ACCPAC COM lib, when I publish to server then it happen.
    Please help.

    Regards
    Peter

    Peter

    July 3, 2014 at 10:57 am

  45. hi Stephen,

    I found the problem is because the value of enable 32-bit applications is false in application pool, I changed it to true, then the error was gone.

    Regards,
    Peter

    Peter

    July 4, 2014 at 5:41 am

  46. I have a weird issue with 64-bit Sage 2014. When I print a sales order confirmation or anything to crystal reports preview I get this hourglass for about 7 seconds before it finally pops up with the report. Nothing special in the report at all. Everything works fine on 32-bit versions. I did read the Upgrade guide about adding 32-bit sources to ODBC but that does not help. Any thoughts?

    Bill Olson

    August 20, 2014 at 4:40 pm

    • Make sure you have the latest Product Update, since it includes fixes to the Crystal runtime. I think most people run on 64 bit Windows now. I tend to think you are better off entering the server name in Database Setup (assuming you are using SQL Server), rather than creating data sources by hand.

      smist08

      August 20, 2014 at 4:44 pm

  47. Hello,

    I just installed PU1 a few weeks ago and re-ran workstation setup on all the workstations. As far as running database setup I usually don’t because when I run it the connections are already there.

    Bill Olson

    August 20, 2014 at 5:01 pm

    • Check the client configuration for SQL Server and make sure that TCP/IP is the only enabled protocol. Sometimes it tries one (which is bad), times out and then tries the next and this causes such a delay on starting things like reports.

      smist08

      August 22, 2014 at 3:48 am

  48. Hi Stephen. I wrote a .net application that allows users to create a payment batch by giving them a list of AP invoices that they can select in a grid type format. Once they select the invoices to pay and click Create Payment Batch it comes back with a message stating that Batch ### was created. I would like if possible for the user to be able to click on that batch # and have it open the ActiveX control for the Payment Batch Entry and browse to that batch #? I’m guessing it’s not possible but just thought I would ask :-) Thanks Stephen.

    On a different note, I’m using the SessionManager to create a session and it grabs the session that’s already open if there is one. However is there a way to tell if the session was created from a new sigon or if it grabbed an existing one? The problem I have is that when the user exits out of my application I’m calling the signoff method, but if they are still in Sage 300 I don’t necessarily want to do that. i suppose it doesn’t matter since Sage 300 still works even if the session has been removed, but just thought I would ask. Thanks Stephen

    Brad Edwards

    August 21, 2014 at 10:05 pm

    • forgot to turn on the notify :-)

      Brad Edwards

      August 21, 2014 at 10:07 pm

    • When you run payment entry you can set an object key. The parameter values are:

      ‘ ObjectKey: A set of parameter name and value pairs concatenated as
      ‘ by the subroutines defined in PropertyString.bas.
      ‘ Possible parameters are:
      ‘ Name Possible Value Meaning
      ‘ —————————————————————————–
      ‘ “BATCH” “1”..”999999999″ The number of the batch to be opened.
      ‘ “NEW” A new batch is to be inserted and opened.
      ‘ “ENTRY” “1”..”9999999″ The number of the entry to be opened
      ‘ Used only if the parameter “BATCH” is
      ‘ given and in range of “1”..”999999999″.
      ‘ “SKIPBATCHWARNING” “TRUE” Suppress any batch readonly/warning messages
      ‘ on load of the batch passed in.
      ‘ “FALSE” Ignore this parameter
      ‘ “MODE” “1” Simulates inquiry mode even if user has edit rights.
      ‘ “0” Ignore this parameter.

      smist08

      August 22, 2014 at 3:52 am

    • You might have a look at this blog article: http://smist08.wordpress.com/2013/07/06/launching-non-sdk-programs-from-the-desktop/ on a better way to handle sessions.

      smist08

      August 22, 2014 at 3:54 am

  49. Hi Stephen,

    So here is my code to open the Payment Entry screen in my non-sdk c# .net app.

    String strCodebase = “”;
    String strObjectHandle = “”;
    String strClsId = “”;

    this.sageSession.CreateObjectHandle(“AP3100″, “”, out strObjectHandle, out strClsId, out strCodebase);

    ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
    var path = this.sageSession.Application.ProgramsPathOnServer;
    startInfo.WorkingDirectory = Directory.GetDirectoryRoot(path);
    startInfo.FileName = Path.Combine(path, @”runtime\a4wContainerXP.exe”);
    String args = String.Format(“/clsid:{0} /codebase:\”{1}\” /objecthandle:{2}”, strClsId, strCodebase, strObjectHandle);
    startInfo.Arguments = args;
    startInfo.UseShellExecute = false;

    Process.Start(startInfo);

    How do I set this objectkey. I see off of the sageSession object where you can get GetObjectKey but no place to set it. Could you possibly give me an example based on my current code where you would set the objectkey to open up the particular batch for a payment entry? I’ll keep searching on the wiki site but so far I’m not finding much. Thanks Stephen :-)

    Brad Edwards

    August 22, 2014 at 12:51 pm

    • nevermind Stephen. I see where you can set the object key in the CreateObjectHandle method and I was able to set the Batch # so that works great. You mentioned the PropertyString.bas in order to determine the options you can set. Where is this file at? Thanks Stephen.

      Brad Edwards

      August 22, 2014 at 1:06 pm

  50. Hi Stephen, I am trying to program some setup screens using c#. Is there an existing way to make sequence and ordered header detail repositories stateless. Thanks

    Jay

    August 30, 2014 at 1:35 pm

    • Not specifically. You would have to manage this yourself.

      smist08

      August 30, 2014 at 5:59 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 254 other followers

%d bloggers like this: