---
url: /flow/guide/scripting-reference/classes/partner/partner.partnertype.md
---

# Partner.PartnerType

## Declaration

property PartnerType: See [TFloPartnerType](/flow/guide/scripting-reference/data-types/enumerations/tflopartnertype);

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
if Partner.PartnerType = fptCustomer then
Value := Partner.CustomerId
else
Value := Partner.SupplierId;
end;
```

## Description

Returns the Partner Type of the active partner within your system. Depending on the result of partner type either CustomerId and TPSupplierId, or SupplierId and TPCustomerId will be available.

If PartnerType is `fptCustomer` then you can reference [Partner.CustomerId](/flow/guide/scripting-reference/classes/partner/partner.customerid) and [Partner.TPSupplierId](/flow/guide/scripting-reference/classes/partner/partner.tpsupplierid).

if PartnerType is `ftpSupplier` then you can reference [Partner.SupplierId](/flow/guide/scripting-reference/classes/partner/partner.supplierid) and [Partner.TPCustomerId](/flow/guide/scripting-reference/classes/partner/partner.tpcustomerid).

If you reference the wrong fields they will return blank.
