Skip to main content
Skip table of contents

p$TDV:SMPAPI:WkTx_LPA


p$TDV:SMPAPI:WkTx_LPA

Read a dedicated project address associated with a given contact or order. All kinds of address types can be read, e.g. the contact address, the delivery address, etc.

The list of the generally available address cards can be found in the table TP_ProjektAnschriftArt.

For the parameters that are read, a parameter group can be defined in the application environment that contains any errors from the query A_ProjectAddresses. This PG is transmitted in the parameter PG as name and filled within the function.

Please note: The parameter group transferred in PG is indirectly transferred as a string and therefore enclosed by quotation marks. Furthermore it has to be defined globally!

Syntax:

Status = p$TDV:SMPAPI:WkTx_LPA( Mode, ObjectID, AddressType, PG )

 

Argument

Type

Meaning

 

Mode

Integer

Switch for contact / order:
1: Contact
2: Order

 

ObjectID

String

Identification number of the SalesManager object depending on the mode:
1: ObjectID is ContactID from TM_Kontakt
2: ObjectID is AuftragID from TM_Auftrag

 

AddressType

String

the searched type of address (array AddressType from call A_ProjectAdresses)

 

PG

String

Name of a parameter group with any arrays from the query A_ProjectAddresses. After successfully reading the address this PG is filled with the data: Otherwise the content will be set to EMPTY.

Result:

Integer

0: the searched address was read
<>0: the address does not exist or error according to SMP-error-state-list

Example:

Reading the delivery address of the order with AuftragID 4711. The data is to be provided in a PG named adr:

Status = p$TDV:SMPAPI:WkTx_LPA( 2, '4711', 'Delivery address', 'adr' )

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.