How to get business object names for table from Sage 100 BOI

SOLVED

Is there a way to get a list of all the business object names for a table from the Sage 100 BOI? The SY_File object from the FileObj property on the session object seems to have methods to get a list of all the table names. Looking to expand on that where if I give it a table name, it can give me the ui, svc, and bus object names that you would use in the BOI to access the table. Just trying to find a more dynamic way for my app to load a list of the available tables in our Sage instance and their business objects instead of having to statically provide it with the info.

Top Replies

  • Hi 

    Typically we use a naming scheme where if the table name is AR_Customer, then the Business Object = AR_Customer_bus, Service Object = AR_Customer_svc, UI Obj = AR_Customer_ui.   Data entry…

  • 0

    In Sage 100, Resources, File Layouts and Program Information.  There are two Object related entries 

  • +1
    verified answer

    Hi 

    Typically we use a naming scheme where if the table name is AR_Customer, then the Business Object = AR_Customer_bus, Service Object = AR_Customer_svc, UI Obj = AR_Customer_ui.   Data entry objects are slightly different in that SO_SalesOrderHeader has a Business Object of SO_SalesOrder_bus, etc.

    There is a way to get the list of business objects that maintain a file, but this could be a LIST where usually the first object in the list is the primary business object, but we do not have a way to track service or Ui objects in the same manner.  You can use the FileObj property to get this list, but I would caution using it as a way to auto-select a business object, I would tend to put logic around our naming scheme instead.

    busObjList = ""
    retVal     = 0
    
    retVal = oSession.FileObj.GetDictExtn("DDF", "AR_Customer", "BUSOBJ", busObjList)

    This is primarily used by custom office for UDF's.  Again, I would tend to use our naming scheme as a guide to put together the business object, service object, and UI object names. 

    For non-data entry files I would go with this:

    Filename = "AR_Customer"

    BusObj = FileName + "_bus"

    SvcObj = FileName + "_svc"

    UIObj   = FileName + "_ui"

    For data entry files, and remember to access the detail and tier distribution tables through the header business object

    FileName = "SO_SalesOrderHeader"

    BusObj = "SO_SalesOrder_bus"

    SvcObj = "SO_SalesOrder_svc"

    UIObj = "SO_SalesOrder_ui"

    FileName = "SO_SalesOrderDetail"

    BusObj = "SO_SalesOrder_bus" Property Lines

    FileName = "SO_SalesOrderTierDistribution"

    BusObj = "SO_SalesOrder_bus" Property Lines.Distribution

    Hope that helps

    E

  • 0 in reply to jepritch

    Thanks. That explanation was helpful. For the most part that matches what I had been finding. I have come across a few objects that aren't following that naming convention, though, so was hoping there was somewhere in the BOI that more explicitly defined the object names for a table. The history tables seem to be the biggest offenders of not following a consistent naming convention. For example, PO_PurchaseOrderHistoryHeader has business objects of PO_PurchaseOrderHistoryInq_ui, PO_PurchaseOrderHistoryInq_svc, and PO_PurchaseOrderHistoryInq_bus but SO_SalesOrderHistoryHeader has business objects of SO_SalesOrderHistoryInquiry_ui, SO_SalesOrderHistory_svc, and SO_SalesOrderHistoryInquiry_bus. Notice for the PO history header Inquiry is abbreviated as Inq but for the SO history header inquiry is spelled out. The svc objects are also named differently among those tables.

    I can live with the way it is. Was just hoping there was a better way. Because of the couple of exceptions to the rule, I've just resorted to explicitly defining in my app the business object names it should use for each table rather than taking the logic around the naming scheme approach. Was just hoping there was a more dynamic way of getting that info from the BOI so that I didn't have to define and maintain the list in my app.

    Thanks for all the help.