Scripting

  • 1.  Using BOI, is it possible to modify a table for wh

    Posted 06-01-2017 18:56
    Using BOI, is it possible to modify a table for which there is a business object, but not a user interface object? For example, there is an 'AR_OpenInvoice_bus"", but not an 'AR_OpenInvoice_ui'. I get an error <NewObject Error: 200>


  • 2.  RE: Using BOI, is it possible to modify a table for wh

    Posted 06-01-2017 19:01
    Yes. Just use AR_Customer_UI for your LookupTask(). That's what I did when I used AR_InvoiceHistoryInquiry_bus to fix data through BOI once.


  • 3.  RE: Using BOI, is it possible to modify a table for wh

    Posted 06-02-2017 01:45
    Excellent! That works nicely, but in general (AR_OpenInvoice was an example) - how would one know which UI name to use? Side Note: while this worked for 'AR_OpenInvoice_bus', it didn't work for 'AR_InvoiceHistoryInquiry_bus' using 'AR_Customer_UI' for the LookupTask() as in your case. Oddly, I received successful return codes using 'AR_InvoiceHistoryInquiry_UI', but the data didn't change. Using 'AR_Customer_UI' a retVal of 0 was returned.


  • 4.  RE: Using BOI, is it possible to modify a table for wh

    Posted 06-02-2017 06:56
    Dan - I have that same question.... which UI name to use? I had a similar issue with IM_ItemCost_bus ... did not want to change cost or qty in the tiers, but needed to change some UDF data... Perhaps not all 'UI'-less business objects are capable of this???? Alnoor - any ideas?


  • 5.  RE: Using BOI, is it possible to modify a table for wh

    Posted 06-02-2017 09:28
    I posted a sample for AR_InvoiceHistoryInquiry_bus using AR_Customer_UI years ago: https://90minds-com.socialcast.com/messages/19501757 Looking at my own script comments and adding some replies for you: ------------- ' Cant use this because the corresponding _bus object will have Read Only security ' oSecurity = oSession.nSetProgram(oSession.nLookupTask(""AR_InvoiceHistoryInquiry_ui"")) ' Dan - It's read only that's why the data didn't change for you ' Use this as the workaround oSecurity = oSession.nSetProgram(oSession.nLookupTask(""AR_Customer_UI"")) 'Dan - My example was from 4.50 so maybe it doesn't work in later version OR you don't have Full access to Cust Maint?? ----------------- Randy and Dan - When there is no corresponding _UI for your _BUS, I believe you are not constrained. This is my educated guess not a verified fact: 1. The _UI must be defined in Sy_Task. Basically if you see a _UI.pvc in File Explorer it's safe to assume it's in Sy_Task but you could verify with DFDM where you change Key No to KPROGRAMNAMEMODULE and search on it. 2) You must have access to it as seen in Role Maintenance. If it's an Inquiry _UI of any kind, you are locked into Read Only. Randy - I seem to remember writing to IM_ItemWarehouse (which has a _BUS but no _UI) by LookupTask on IM_ITEM_UI. So no science for me I just pick some _UI for the same module that is related somehow to the table I want to change.