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

Add, Remove UDO records and child records

hey All,

Can anyone tell me how I can remove a row from my UDO document lines table? I know how to update a row in the UDO document table but i am unsure as to how I can remove a row from my lines table using DI API.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 03, 2006 at 05:30 PM

    Hello Curtis,

    As far as I know, you can't access to UDO using the DI API.

    you may be able to do that using a recordset, but you're not allowed to do it, and it may have some bad effect

    Sebastien

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Frank Moebius

      Actualy there is a way if you want do cascade remove all the child records of you master data UDO

      Here is a little snipet of how i did it in C#

      private void CascadeRemove(string __Code) { //Code is the MasterData record's code

      UserTable _ChildTable = SBOCompany.UserTables.Item("ChildTable");

      while (_ChildTable.GetByKey(__Code)) {

      _ChildTable.Remove();

      }

      }

  • Posted on Feb 07, 2006 at 06:00 AM

    Hi Curtis,

    If you've got the Parent ID of the child lines you want to remove its easy. You won't be using the udo object in the DI API. You will run a delete query using a Recordset Object on your table. Here is an example:

    ''''''''''''''

    DELETE 
      FROM [@SOS_RBC]
     WHERE DocEntry = 'xxx'
    

    '''''''''''''''

    (@SOS_RBC has the object type Document Lines)

    DocEntry is the key to the master table.

    Add a comment
    10|10000 characters needed characters exceeded

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.