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: |
| ObjectID | String | Identification number of the SalesManager object depending on the mode: |
| 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 | |
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' ) | ||