Click or drag to resize

IDocumentForeignKey Property

ForeignKey Get the foreign key values for this document.

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
SOForeignKey ForeignKey { get; }

Property Value

Type: SOForeignKey
SOForeignKey
Examples

ForeignKey

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

VB
dim objso
set objso = CreateObject("superofficedb.database")
set objsoapp = CreateObject("superoffice.application")
If not (objSO is nothing) Then
    objso.login "<username>", "<password>"
    if objsoapp.currentdocument.identity  <> 0 then
        set mydocument = objso.getdocument(objsoapp.currentdocument.identity)
        mydocument.foreignkey.set "myapplication", "mydevice", "mykey",  "this is my foreignkey"
        msgbox mydocument.header &  " has the following foreginkey set: " &  mydocument.foreignkey.get ("myapplication", "mydevice", "mykey")
    else
        msgbox "mark a document and  try again"   
    end if
else
    msgbox "unable to connect to database"
end if
set objso = nothing

See Also