cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Code(173-36) Error on adding record to Usertable

Former Member
0 Kudos

Dear Support,

I have designed a form in screen painter and also added controls, even for Code and Name. Then I binded all the contols to table fields via sdk.I have registered usertable as UDO of Type Master.Then in the fordataevent BusinessObjectInfo.BeforeAction = True, I have created an object of the usertable and set values for Code and Name.but application generating an error 'Invalid Code (173-36).I was not able to insert any record to usertable. But on checking the form.BusinessObject.key in the formdata event, it returs an empty string.Since its an userdefined table How we can set Object key for the Table?.Does Object Key means code field. Can any one help me Please.

Thanks in advance.

Edited by: Nirmala Thomas on Aug 3, 2009 1:56 PM

View Entire Topic
former_member201110
Active Contributor
0 Kudos

Hi Nirmala,

You cannot add data to a UDO-type user-defined table in this way. The UserTable object in the DI API is used to manipulate data in non-UDO tables and won't work for UDOs.

Typically with a UDO all you need to do is set the ObjectType property of the form to the name of your UDO and then bind the controls to the fields of the table. SBO will then automatically provide the functionality to add and edit data. Alternatively, don't register your table as a UDO and then you can read and write data to it using the UserTable object

Since patch 47 of SBO 2007A there has been a new object in the DI API to manipulate UDO data directly through the DI API.

Kind Regards,

Owen