TransferOwnership

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > RemoteAccess >

TransferOwnership

available from build: 20110714

Description

This command is useful to automate Remote Access procedures. In details it transfers the ownership of a record from a company to another one.

Syntax

call DBWShell("TransferOwnership uid  NewCompanyID [okProcessRelatedDocuments]")

Parameter

uid

the unique_id of the record to change the ownership of

NewCompanyID

the new COMPANY_ID to be set for the selected record

okProcessRelatedDocuments

Optional.
0: default. Do not process any related document.
1: transfer ownership of related documents too.

Remarks

The Remote Access Mode must be enable.

See also

TakeOwnership

Example

DBWShell("CurrentDocument")
uid = DBWResult("@DOCUMENT_UNIQUE_ID")
newCompanyID = "Mechworks"
DBWShell("TransferOwnership  " & uid & " " & newCompanyID & " 1")