Skip to Content
avatar image
Former Member

UI: How to get the newly added doc number/entry?

After user added a document (SO for example) from SBO screen by clicking "Add" button, I want to know the number/entry of the newly added doc. How can I do it?

Thanks,Xuechen

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 21, 2004 at 10:56 AM

    You can call the following method from the Company-object in the DI-API:

    GetNewObjectCode(ByRef ObjectCode As String)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 21, 2004 at 05:20 PM

    Something like this will work:

    .

    .

    .

    If (0 <> vDOC.Add()) Then

    MsgBox "Unable to add document"

    Else

    'get it's code

    Call vCmp.GetNewObjectCode(strCode)

    nCode = CLng(strCode)

    vDOC.GetByKey (nCode)

    End If

    .

    .

    .

    Add comment
    10|10000 characters needed characters exceeded