Skip to Content
author's profile photo Former Member
Former Member

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2007 at 06:20 PM

    Hi Mike,

    You must just enter the name of the User Defined Object that you have created.

    Hope it helps,

    Adele

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 12, 2007 at 06:40 AM

    Hi.. had same problem a while back and did some studies and a message to SAP Srpport about it...

    You can

    - Create Choose From Lists to UDO...

    You can not

    - Create a linkbutton to an UDO...

    If you think about it it make sense that it is not possible even though we would like it... What i linkbutton does is it open another window and find a specific record... How should the SDK EVER be able to do such a thing with a form that you create (remember that after creation you migth do all sorts of business logic filling comboboxes with values and such)... We can be mad at SAP, but not for note giving the impossible....

    The above is the problem but also the solution... what you can do is simulate exactly the process above with a dummy linkbutton to another type and code that open your for and perform the search

    One final question that elude me is why the SDK includes the LinkedObjectType as a string if it doesn't do what we think it does... Perhaps it work on UDO that use the standard form (making it SAP the have done the implementation of the UDO but I never got around to trying).... Also, why the missing support of lf_None as a linked object type....

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.