Linking UDO to ChooseList

Hello...
Is there someone who implemented a ChooseList with an ObjectType "lf_UserDefinedObject"??
Here is a code snippet:
' Adding CFL
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = SAPbouiCOM.BoLinkedObject.lf_UserDefinedObject
oCFLCreationParams.UniqueID = "CFL1"
oCFL = oCFLs.Add(oCFLCreationParams)
So if you want to add the CreationParams you will get
this exception:
ChooseFromList - Invalid Object Type
Prerequisites:
An UDO "Testtable" is registered by SAP B1 Standard
In another Topic there it is confimed, that UDO´s can not be linked with linked buttons. Maybe here it is the same...
Best regards and thanks for help
Jochen

You only need to define your UDO with B1 application or DI API.
Then you create your CFL and set ObjectType = "UDO_Code", then add it to the ChooseFormList collection of your form.
If you want your CFL to be linked to an edit text then you need your EditText to have a DataSource (UserDataSource or DBDataSource or DataTable):
oEdit.DataBind.SetBound(True, "", "DS")
And link the CFL to the EditText:
oEdit.ChooseFromListUID = "UserObjectCFL"
oEdit.ChooseFromListAlias = "Code"
Hope it helps
Trinidad.

Similar Messages

  • Linking UDO to Item Master Data

    Hello Everyone
    I just created a User Define Object to store alternative codes for items. In the master data i put all the itemcodes and a description. In the Master Data rows I store all the alternative codes and the supplier that item can have. Sometimes they are few alternativa codes, sometimes a lot
    Now I want for the these UDO be related to the Item Master Data so it can me update in the same place. Any ideas?

    Ok. These how the UDO works now:
    In the master data level, i use the itemcode. When i double click the line, it takes me to another table with the alternative codes for that specific itemcode only
    I added a UDF to the item master date and linked to the table (i tried linking them to the udo but could not find how) so it shows all the rows in the table, not just the ones matching that item. I tried with 2 UDF but still could not relate the two. Any ideas how???
    Can it be done with the Screen Painter?? Where can i fin documentation about the Screen Painter usage?? I only found documentation on installation

  • How to Define "Define new" Option in UDF

    Hello
    My client want there is define new option in udf also
    suppose we create
    1) By road
    2) By DTDC
    there is many more that he want to crate when he need
    so he want in drill down option there is Define new option then he create next shipping method in udf
    Note: shiping type is only example i want define new in udf

    Hi Jaykumar............
    You can do this by two ways........
    1. By FMS
    2. By UDF with Linked UDO.
    1. By FMS:
    Create UDF as you created already. Press ShiftF2 on this UDF and select 2nd option and update. Not when you press ShiftF2 or press Indicator then it will open the list of values where you can find New Button and you can define here new value at run time.
    2. By UDF with Linked UDO:
    Create UDF as you created Already. Now Create a No Object UDO where you can define this code and its name or value.
    When you create this UDF you have one option of Linked UDO in User defined Table window.
    Select this UDO in drop down so that it gets linked with this UDF and when you see this UDF at your form you can find the dropdown list with Define New Option.........
    Hope this will clear you..........
    Regards,
    Rahul

  • Link button in grid column to UDO

    Hi,
    I read through the posts regarding linking to user-defined objects, but I found it very confusing.  Some posts say that it is not possible to create a link button to a UDO; others say you need to use the extended-object property. 
    Does anyone have code that I could use to designate a grid column as a link to a UDO?
    The code I'm using is:
    oGrid.Columns.Item(1).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
    txtColumn = oGrid.Columns.Item(1)
    txtColumn.Width = 83
    txtColumn.LinkedObjectType = ???
    I need to fill in the "???".
    If I designate an SAP B1 object type it works.
    Thanks,
    Mike

    Rasmus,
    Thanks for taking the time to provide a detailed explanation.  I think though that SAP needs to solve these kinds of problems.  It is my understanding that the main design goal of Business One is to provide an infrastructure that would reliably enable customization around it.  There is no such thing as accounting software that does not need some kind of adaptation to make it work for specific kinds of business models.  So a design that makes customization easier makes a great deal of sense. 
    If it is necessary to improvise in order to do what you need, then this design goal has not been met.  It also means that Business One is not what is managing the process because you are effectively going around it.  This in my view is actually worse than if Business One made these links work.  By forcing us to go around it, we effectively loose the data protection that Business One should be providing.  This is my take on it anyway.
    We solved the problem by opening the appropriate form with the appropriate data in it by using the double-click event.  The reason we have to do it this way is because the SDK will not even display the link button in a grid if its target is a UDO.  This brings up another reason for the SDK to be more cooperative with these efforts.  SAP has provided a detailed document describing the need to not deviate from Business One’s look and feel.  Perhaps SAP needs also to provide an SDK that more reliably and easily enables that caveat.
    If Business One had been designed from the ground up using SOA, its original design goal would be a lot easier to meet.  Maybe this is the real problem.
    Thanks,
    Mike

  • Linking the UDO of type document to user defined field

    I created the user defined field and i need to link the UDO of type document to that user defined field. How to link the UDO to user defined field.

    Dear
    do you mean to add a user defined field to an document type UDO? if this  is the case,
    1. create the UDT
    2. go to Tools-> customization tools->User Defined Fields-Management, expand User Tables, add the udf to the UDT
    3. register the UDT as UDO.
    best regards,
    xiaodan an

  • UDO - Link button

    Hi,
    I have my custom designed form.
    Can I add a 'Orange Link arrow' for an UDO in it?
    I could do it for the system objects.
    When I tried it in the screen painter, I got the error 'Invalid Numeric Value'.
    Thanks in advance.
    Regards,
    Geetha

    Hi Geetha,
    I don't think UDOs are supported for link buttons (or should I say, I can't get it to work ) so you'll need to code it yourself. If you trap the event of the user clicking on the link button, you can open your UDO form in Find mode, populate the key field and click the Find button.
    Kind Regards,
    Owen

  • Link Button to open an UDO Object Form

    hi
      I was trying to open my udo form using a link button in a data grid. But i just cannot link the object.It is working fine with system forms.But i just want to know how to link an UDO Object.

    hai Manish,
             you just catch the row you clicked and get the data with your linkbutton which you have clicked then activate your UDF                     (by activating menu event) and then perform the find action according to the data.......
    i hope this helps .....
    Regards.....
    Chethan B.E.
    9342504047
    [email protected]

  • Link Button to UDO in my Grid

    hi,
    is ther a way to implement a link button im my Grid Column and bind it to an existing UDO ?
    I'm using SBO 2007A SP00 PL37.
    the following code, shows the link button and links to an item
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    i tried to link to my udo by the following but without success:
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = "UDO_VM_CONTRACT"
    I'm looking for a way of direct linking. Now i try to do the following workaround, but maybe there is a better way to solve this problem:
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                            If pVal.BeforeAction = False Then
                                BubbleEvent = False
                                moSboApplication.ActivateMenuItem("VmContract")
                            End If
    best regards
    Markus
    Edited by: Markus Rewak on Jul 10, 2008 11:11 PM
    Edited by: Markus Rewak on Jul 10, 2008 11:12 PM

    Hi Madhu,
    the udo object type is not working. To get the drill down functionality you have to use the item-object (4) and catch the matrix link pressed event and search the udo by your own logic.
    ' Add a link button to a column
            oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                                If pVal.ColUID = "Vnr" And pVal.BeforeAction = True Then
                                    BubbleEvent = False
                                Dim sLink As String
                                Dim oGrid As SAPbouiCOM.Grid
                                oGrid = oForm.Items.Item("Gcont").Specific
                                oGrid.DataTable = oForm.DataSources.DataTables.Item("DTcont")
                                sLink = oGrid.DataTable.GetValue(0, pVal.Row)
                                moSboApplication.ActivateMenuItem("VMarkus")
                                moSboApplication.Forms.ActiveForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
                                moSboApplication.Forms.ActiveForm.ActiveItem = "txtdocnum"
                                moSboApplication.Forms.ActiveForm.Items.Item("txtdocnum").Specific.value = sLink
                                moSboApplication.Forms.ActiveForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                                End If
                    End Select
    This works very well.
    have fun
    Markus

  • Add new document links to UDO

    Hello,
    I have created a UDO from an RFX and am now am trying to link the 2. I want to add a link in the RFX to the UDO and in the UDO to the RFX.
    I have added the link from RFX to UDO as follows:
    linkCollnRFX=doc.getDocumentLinkList();
         newMember=linkCollnRFX.create();
         newMember.setDisplayName("Test Link");
         newMember.setLinkDefinitionType(new DocLinkDefinitionTypeEnumType(1));
         newMember.setLinkDocObjRef(udoBean.getObjectReference());
         relnHome =IBeanHomeLocator.lookup(session, DocumentLinkDefinitionIBeanHomeIfc.sHOME_NAME);
         relnBean = relnHome.findUnique("RelatedSRF");
         newMember.setLinkDefinitionObjRef(relnBean.getObjectReference());
         linkCollnRFX.add(newMember);
         //save the document
         doc.getIBeanHomeIfc().save(doc);
    I need to the same thing for the UDO. UserDefinedBizDoc1IBeanIfc has getAllDocumentLinks() which returns CollectionIfc. CollectionIfc has no add method. Can someone please help me understand how I can add to this collection?
    Thanks,
    MP

    Thanks Baski,
    getDocumentLinkList()  is not listed in UserDefinedBizDoc1IBeanIfc. I anyway tried and as expected got the following error
    Error in method invocation: No args method getDocumentLinkList() not found in class'com.sap.odp.api.doccommon.userdefined.UserDefinedBizDoc1IBeanImpl' : at Line: 30 : in file: inline evaluation of: ``import com.sap.odp.api.doccommon.userdefined.*;  import com.sap.odp.api.doccommo . . . '' : udoBean .getDocumentLinkList ( )
    I also already tried casting this yesterday, I tried the following 3 methods, and all gave me the same error listed below.
         linkCollnUDO=(AssociativeCollectionIfc) udoBean.getAllDocumentLinks();
         newMemberUDO=linkCollnUDO.create();
         linkColln=udoBean.getAllDocumentLinks();
         linkCollnUDO=(AssociativeCollectionIfc) linkColln;
         newMemberUDO=linkCollnUDO.create();
         linkColln=udoBean.getAllDocumentLinks();
         AssociativeCollectionIfc linkCollnUDO=(AssociativeCollectionIfc) linkColln;
         newMemberUDO=linkCollnUDO.create();
    2011-10-13 08:34:43.459     ERROR     local4     ScriptManager     executeToolbarScript     RequestHandler.RqThread: tb_script     4D37565E1B5A849F12847A27A8ED6F5E     #abc.context.id#     abcadmin               Toolbar (rfx.RFXDoc. ABC1) script exception: ID: Illegal cast. Cannot cast com.sap.odp.api.doccommon.userdefined.UserDefinedBizDoc1IBeanImpl$1 to com.sap.odp.api.ibean.AssociativeCollectionIfc
    Am I doing something wrong? Can you help me to cast this properly?
    Thanks,
    MP

  • Link button for udo in the xml

    Hi all ,
    I know how to link a system object like this.
    <column AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" editable="1" font_size="12" forecolor="-1" right_just="0" text_style="0" title="Code" type="116" uid="202" visible="1" width="80">
                                                           <databind alias="U_ItemCode" databound="1" table="@APS1"/>
                                                           <ExtendedObject linkedObject="4"/>
                                                      </column>
    but how can I link a UDO ? if My UDO' name is MUDO ,I  write the XML like this,
    <ExtendedObject linkedObject="MUDO"/>
    and I always got error . who know ?
    thanks

    Hi Wei,
    That's because you can't link to UDO's. There is no object type for an UDO. You should use onject type NONE and make the logic behind it yourself. (Capture the linked button press event and handle all actions)
    Hope this helps,
    Rowdy

  • Linking of 1 Document UDO to 3 Document lines UDOs

    I have created one user defined object (table) of type Document and three user defined objects (table) of type Document lines. what I need to do is to connect these three document lines to this document. But when I am registering the Document it is not happening. Someone plz guide me its urgent!!!

    Amol,
    The User Objects registration process will support only one Lines object. 
    Therefore you can only link one document lines object through the registration Wizard.
    Probably as Yun is suggesting there might be a way through SDK.
    Suda

  • Using a Single Registered UDO for multiple Transactions

    Dear Experts,
    We are developing a Expense Booking System by using SAP B1 SDK. in .NET
    The scenario is like this.
    Need to book the expenses independently by using an Expense Booking Screen, and also from a Transaction screen (Sales) where the user enters the expenses details incurred during the sales activity.
    Data from both the screens should be saved in a single User defined table.
    ie, The Expense Booking Screen uses the table for direct saving and the Sales screen uses the same table as the child table of the transaction where the parent (header) table holds the details of Sales activity.
    The table object is registered for the Direct Expense Booking screen.
    Can I use the same object for the Sales Expense booking screen?
    Is it possible?
    If so, how can I implement it?
    Please advice..
    Thanks in advance
    Regards,
    Toms

    Sure
    Generic services are using to maintain UDO table using SDK. You no need to assign values to datasource items. You can simple collect the values from the form items / user data sources and update the UDO table accordingly.
    First you go to this link
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d04b34b5-68cf-2b10-bc98-806feb4299ba
    and download the DI GENERAL SERVICE SAMPLES
    Applications with full source code is available for
    1. Master Data UDO maintenance
    2. Master Data UDO + Child Tables Maintenance
    3. Document Data UDO maintenance
    4. Document Data UDO + Child Tables Maintenance
    Thank you
    Anoop

  • Error while Importing Data in UDO.

    Hello,
    I had created one User defined table with Master Datatype.
    I register this Table and creating Master type of UDO.
    I created template for this UDO throgh DTW.
    I am using Following Filed in the template.
    Code, Name, Field 1 and Field 2.
    While i am importing data using this template through DTW using, i got following error.
    Master Data Type user Table can not add row65171.
    Regards,
    Arpit Shah

    Dear,
    Please see the Note 804685 for information about how to
    import data into user defined tables linked to an object type.
    It is not possible to import data into UDO tables via the DTW.
    Regards
    Apple

  • Document type UDO ignoring Period field

    Hi all:
    I have a document type UDO that includes the automatically created "Period" field which links to financial periods (OFPR). However, apparently I cannot modify it in my form, as no matter what I write into the field the database always ends up with the current period number, instead of the one corresponding to the date I have in my form.
    The field is correctly databound as it shows the saved values correctly.
    The field is also set correctly by the add-on through code in OnBeforeFormDataAdd before being saved into the database (depending on date selected in a specific field).
    The problem is, that even though I am not depending on that field, if the current period is locked, my add-on cannot be used to enter data for another (previous or future) period, because B1 automatically rejects the document when saving ("Period is locked").
    Any ideas on this?
    Thanks,
    Joerg.

    I don't have a problem using that field. The problem is that it does not accept what I set it to. It's always saved with the current period number, not the one I tell it to use (the one corresponding to the date used in my UDO document).
    As for document type UDO, yes, the add-on is already installed at several clients, I can't just go ahead and change the UDO type. Plus I am using some of the features that come with that type of object (document numbering being one).
    As for unlocking the finance period, I haven't tried it but I guess that wold only work if the user has permission to do so, and I couldn't count on that...
    Joerg.

  • Best way to link user form with user table

    Hi all.
    What is the best way to link an user form with a user table (with all of the functions, add, update...)? I have created a simple form, and the question is next:
    depending the type object of the user table (document, master...) i have facilities to imlement the basic operations in the form?  if i create an UDO i have the functions but i want to use the form that i created with a screen painter.
    Thanks.

    Hi again i want add a new comment please.
    If i want do all functions (add,update...) of my form in my user table, and i want my user table is a <b>type document</b>? how can add new lines in my user table with objet <b>type document</b>? because when i make the instance i nedd to say what type of document is (item,order...) and when i do an add(), not add() in my user table. In what moment or how can assign that the add,update functions... affect in my table?
    Thanks again.

Maybe you are looking for