Company object

First available in SystemsLink: 2014.2

Used by External SystemsLink for TMWSuite.

Methods

The Return Value for all methods is Company.ReturnObject.
Method Name Parameters Company.ReturnObject.
ReturnCode
Description

Name

Data type (in C#)

NewCompany

N/A

0 = successful

1000 = errors occurred

Creates a new Company object in memory

NewCompanies

total

int

0 = successful

1000 = errors occurred

Creates the specified number of new Company objects in memory

RetrieveCompany

criteria

Company.Criteria

0 = successful

100 = no records found

1000 = errors occurred

Returns all Company objects that meet the provided criteria

SaveCompany

companies

List<Company>

0 = successful

100 = validation errors occurred and updates prevented

500 = update proceeded with warnings

1000 = error occurred and updates prevented

Saves the provided Company objects and updates the database if requested, then returns the saved objects if the save was successful

updateDB

bool

Properties and column mapping

To condense the information in this table, the Database Column Name uses the following abbreviations for database tables:

c = company

Property Database Column Modifiable Comments

Name

Data Type (in C#)

Name

Data Type

1

Address1

string

c.cmp_address1

varchar(100)

Insert/Update

2

Address2

string

c.cmp_address2

varchar(100)

Insert/Update

3

Address3

string

c.cmp_address3

varchar(100)

Insert/Update

4

AgedInvoice

string

c.cmp_agedinvflag

char(1)

Insert/Update

5

AltID

string

c.cmp_altid

varchar(25)

Insert/Update

6

ARType

string

c.cmp_artype

varchar(6)

Insert/Update

7

BillMiles

string

c.cmp_mileagetable

varchar(2)

Insert/Update

8

BookingTermianl

string

c.cmp_bookingterminal

varchar(12)

Insert/Update

9

Branch

string

c.cmp_bookingterminal

varchar(12)

Insert/Update

Equal to BookingTerminal

10

City

int32

c.cmp_city

int

Insert/Update

11

CityName

string

c.cty_nmstct

varchar(25)

Insert/Update

12

CMPMisc1

string

c.cmp_misc1

varchar(254)

Insert/Update

13

CMPMisc2

string

c.cmp_misc2

varchar(254)

Insert/Update

14

CMPMisc3

string

c.cmp_misc3

varchar(254)

Insert/Update

15

CMPMisc4

string

c.cmp_misc4

varchar(254)

Insert/Update

16

CMPMisc5

string

c.cmp_misc5

varchar(254)

Insert/Update

17

CMPMisc6

string

c.cmp_misc6

varchar(254)

Insert/Update

18

CMPMisc7

string

c.cmp_misc7

varchar(254)

Insert/Update

19

CMPMisc8

string

c.cmp_misc8

varchar(254)

Insert/Update

20

CompanyID

string

c.cmp_id

varchar(8)

Insert

21

CompanyName

string

c.cmp_name

varchar(100)

Insert/Update

22

ContactName

string

c.cmp_contact

nvarchar(40)

Insert/Update

23

Contacts

List Contact>

Insert/Update

Reference Contact object in the Contact table

24

Country

string

c.cmp_country

varchar(50)

Insert/Update

25

CreatedDate

DateTime

c.cmp_createdate

datetime

Insert/Update

26

CreditAvailable

decimal

c.cmp_creditavail

money

Insert/Update

27

CreditLimit

decimal

c.cmp_creditlimit

money

Insert/Update

28

CreditTerms

string

c.cmp_terms

char(3)

Insert/Update

29

Currency

string

c.cmp_currency

varchar(6)

Insert/Update

30

DataSourceID

string

N/A

Not mapped

31

DefaultBillTo

string

c.cmp_defaultbillto

varchar(8)

Insert/Update

32

DefaultCommodity

string

c.cmd_code

varchar(8)

Insert/Update

33

DefaultPriority

string

c.cmp_defaultpriority

varchar(6)

Insert/Update

34

DeportFlag

bool

c.cmp_depot

char(1)

Insert/Update

35

DivOfParent

string

c.cmp_mastercompany

varchar(8)

Insert/Update

36

EDI210

int32

c.cmp_edi210

int

Insert/Update

37

ExternalID

int32

c.external_id

Int

Insert/Update

38

ExternalVendorType

string

c.external_type

varchar(6)

Insert/Update

39

Fax

string

c.cmp_faxphone

varchar(20)

Insert/Update

40

FreeStops

int32

c.cmp_freestops

int

Insert/Update

41

FridayCloses

string

c.cmp_closes_fr

int

Insert/Update

42

FridayStarts

string

c.cmp_opens_fr

int

Insert/Update

43

Geographic

string

c.cmp_geoloc

varchar(50)

Insert/Update

44

InvoiceType

string

c.cmp_invoicetype

varchar(6)

Insert/Update

45

IsAccountOf

bool

c.cmp_accountof

char(1)

Insert/Update

46

IsActive

bool

c.cmp_active

char(1)

Insert/Update

47

IsAtHomeLocation

bool

c.cmp_athome_location

char(1)

Insert/Update

48

IsBillTo

bool

c.cmp_billto

char(1)

Insert/Update

49

IsConsignee

bool

c.cmp_consignee

char(1)

Insert/Update

50

IsDirty

bool

N/A

Not mapped or used in service

51

IsNew

bool

N/A

Not mapped, set to false during save to update

52

IsParent

bool

c.cmp_parent

char(1)

Insert/Update

53

IsPort

bool

c.cmp_port

char(1)

Insert/Update

54

IsServiceLocation

bool

c.cmp_service_location

char(1)

Insert/Update

55

IsShipper

bool

c.cmp_shipper

char(1)

Insert/Update

56

IsSupplier

bool

c.cmp_supplier

char(1)

Insert/Update

57

IsValid

bool

N/A

Not mapped or used in service

58

Latitude

int32

c.cmp_latseconds

int

Insert/Update

59

Longitude

int32

c.cmp_longseconds

int

Insert/Update

60

MailToAddress1

string

c.cmp_mailto_address1

varchar(40)

Insert/Update

61

MailToAddress2

string

c.cmp_mailto_address2

varchar(40)

Insert/Update

62

MailToCity

int32

c.cmp_mailto_city

int

Insert/Update

63

MailToCityName

string

c.mailto_cty_nmstct

varchar(25)

Insert/Update

64

MailToName

string

c.cmp_mailto_name

varchar(30)

Insert/Update

65

MailToState

string

c.cmp_mailto_state

varchar(6)

Read only

66

MailToTerms1

string

c.cmp_mailto_crterm1

varchar(6)

Insert/Update

67

MailToTerms2

string

c.cmp_mailto_crterm2

varchar(6)

Insert/Update

68

MailToTerms3

string

c.cmp_mailto_crterm3

varchar(6)

Insert/Update

69

MailToZip

string

c.cmp_mailto_zip

varchar(10)

Insert/Update

70

MapAddress

string

c.cmp_mapaddress

varchar(50)

Insert/Update

71

MasterBillDays

int16

c.cmp_mbdays

smallint

Insert/Update

72

MaxDunnage

int32

c.cmp_max_dunnage

int

Insert/Update

73

MinCharge

decimal

c.cmp_min_charge

money

Insert/Update

74

MondayCloses

string

c.cmp_closes_mo

int

Insert/Update

75

MondayStarts

string

c.cmp_opens_mo

int

Insert/Update

76

OtherType1

string

c.cmp_othertype1

varchar(6)

Insert/Update

77

OtherType2

string

c.cmp_othertype2

varchar(6)

Insert/Update

78

OverrideStopEvents

string

c.cmp_stop_events

varchar(100)

Insert/Update

79

PalletCount

int32

c.cmp_palletcount

int

Insert/Update

80

PayFrom

string

c.cmp_payfrom

varchar(8)

Insert/Update

81

Phone1

string

c.cmp_primaryphone

varchar(20)

Insert/Update

82

Phone2

string

c.cmp_secondaryphone

varchar(20)

Insert/Update

83

PrintCopies

int16

c.cmp_invcopies

smallint

Insert/Update

84

PrintMailToWhenLineHaul

bool

c.cmp_MailtToForLinehaulFlag

char(1)

Insert/Update

85

PrintMailToWhenTermMatch

bool

c.cmp_mailtoTermsMatchFlag

char(1)

Insert/Update

86

RefType

string

c.cmp_reftype_unique

varchar(6)

Insert/Update

87

RevenueType1

string

c.cmp_revtype1

varchar(6)

Insert/Update

88

RevenueType2

string

c.cmp_revtype2

varchar(6)

Insert/Update

89

RevenueType3

string

c.cmp_revtype3

varchar(6)

Insert/Update

90

RevenueType4

string

c.cmp_revtype4

varchar(6)

Insert/Update

91

SaturdayCloses

string

c.cmp_closes_sa

int

Insert/Update

92

SaturdayStarts

string

c.cmp_opens_sa

int

Insert/Update

93

SlackTime

int32

c.cmp_slack_time

int

Insert/Update

94

State

string

c.cmp_state

varchar(6)

Read only

95

StpType2

string

c.cmp_stp_type2

varchar(6)

Insert/Update

96

StpType3

string

c.cmp_stp_type3

varchar(6)

Insert/Update

97

SubCompany

string

c.cmp_subcompany

varchar(6)

Insert/Update

98

SundayCloses

string

c.cmp_closes_su

int

Insert/Update

99

SundayStarts

string

c.cmp_opens_su

int

Insert/Update

100

TaxID

string

c.cmp_taxid

varchar(15)

Insert/Update

101

ThursdayCloses

string

c.cmp_closes_th

int

Insert/Update

102

ThursdayStarts

string

c.cmp_opens_th

int

Insert/Update

103

TransferType

string

c.cmp_transfertype

varchar(6)

Insert/Update

104

TuesdayCloses

string

c.cmp_closes_tu

int

Insert/Update

105

TuesdayStarts

string

c.cmp_opens_tu

int

Insert/Update

106

Type

string

c.cmp_crmtype

varchar(6)

Insert/Update

107

UpdateableProperties

CompanyUpdateInfo

N/A

Not mapped

108

UpdatedBy

string

c.cmp_updatedby

varchar(20)

Insert/Update

109

UpdatedDate

DateTime

c.cmp_updateddate

datetime

Insert/Update

110

WednesdayCloses

string

c.cmp_closes_we

int

Insert/Update

111

WednesdayStarts

string

c.cmp_opens_we

int

Insert/Update

112

Zip

string

c.cmp_zip

varchar(10)

Insert/Update

Company.ReturnObject

Property Name Data Type (in C#) Comments

1

ErrorMessages

List<string>

2

ErrorObjectIndexList

List<int>

3

Exceptions

List<Exception>

4

ReferenceObjects

List<Company>

5

ReturnCode

int

6

TraceMessages

List<string>

7

WarningMessages

List<string>

CompanyUpdateInfo object

  • Data types (in C#) for all properties are bool.

  • Set the property to true to update the corresponding Company property.

Property Name Property Name Property Name

1

Address1

36

ExternalID

71

OtherType1

2

Address2

37

ExternalVendorType

72

OtherType2

3

Address3

38

Fax

73

OverrideStopEvents

4

AgedInvoice

39

FreeStops

74

PalletCount

5

AltID

40

FridayCloses

75

PayFrom

6

ARType

41

FridayStarts

76

Phone1

7

BillMiles

42

Geographic

77

Phone2

8

BookingTermianl

43

InvoiceType

78

PrintCopies

9

Branch

44

IsAccountOf

79

PrintMailToWhenLineHaul

10

City

45

IsActive

80

PrintMailToWhenTermMatch

11

CityName

46

IsAtHomeLocation

81

RefType

12

CMPMisc1

47

IsBillTo

82

RevenueType1

13

CMPMisc2

48

IsConsignee

83

RevenueType2

14

CMPMisc3

49

IsParent

84

RevenueType3

15

CMPMisc4

50

IsPort

85

RevenueType4

16

CMPMisc5

51

IsServiceLocation

86

SaturdayCloese

17

CMPMisc6

52

IsShipper

87

SaturdayStarts

18

CMPMisc7

53

IsSupplier

88

SlackTime

19

CMPMisc8

54

Latitude

89

StpType2

20

CompanyID

55

Longitude

90

StpType3

21

CompanyName

56

MailToAddress1

91

SubCompany

22

ContactName

57

MailToAddress2

92

SundayCloses

23

Contacts

58

MailToCity

93

SundayStarts

24

Country

59

MailToCityName

94

TaxID

25

CreatedDate

60

MailToName

95

ThursdayCloses

26

CreditAvailable

61

MailToTerms1

96

ThursdayStarts

27

CreditLimit

62

MailToTerms2

97

TransferType

28

CreditTerms

63

MailToTerms3

98

TuesdayCloses

29

Currency

64

MailToZip

99

TuesdayStarts

30

DefaultBillTo

65

MapAddress

100

Type

31

DefaultCommodity

66

MasterBillDays

101

UpdatedBy

32

DefaultPriority

67

MaxDunnage

102

UpdatedDate

33

DeportFlag

68

MinCharge

103

WednesdayCloses

34

DivOfParent

69

MondayCloses

104

WednesdayStarts

35

EDI210

70

MondayStarts

105

Zip

Criteria object

To condense the information in table, the Database Column uses the following abbreviations for database tables:

c = company

Name Database Column Data Type (in C#) Comments

1

Address1

c.cmp_address1

string

2

Address2

c.cmp_address2

string

3

Address3

c.cmp_address3

string

4

AltID

c.cmp_altid

string

5

BookingTerminal

c.cmp_bookingterminal

string

6

City

c.cmp_city

int?

7

CMPMisc1

c.cmp_misc1

string

8

CMPMisc2

c.cmp_misc2

string

9

CMPMisc3

c.cmp_misc3

string

10

CMPMisc4

c.cmp_misc4

string

11

CMPMisc5

c.cmp_misc5

string

12

CMPMisc6

c.cmp_misc6

string

13

CMPMisc7

c.cmp_misc7

string

14

CMPMisc8

c.cmp_misc8

string

15

CompanyID

c.cmp_id

string

16

CompanyName

c.cmp_name

string

17

ContactName

c.cmp_contact

string

18

DivOfParent

c.cmp_mastercompany

string

19

Geographic

c.cmp_geoloc

string

20

IsAccountOf

c.cmp_accountof

bool?

21

IsActive

c.cmp_active

bool?

22

IsAtHomeLocation

c.cmp_athome_location

bool?

23

IsBillTo

c.cmp_billto

bool?

24

IsConsignee

c.cmp_consignee

bool?

25

IsParent

c.cmp_parent

bool?

26

IsPort

c.cmp_port

bool?

27

IsServiceLocation

c.cmp_service_location

string

28

IsShipper

c.cmp_shipper

bool?

29

IsSupplier

c.cmp_supplier

bool?

30

OtherType1

c.cmp_othertype1

string

31

OtherType2

c.cmp_othertype2

string

32

Phone1

c.cmp_primaryphone

string

33

RevenueType1

c.cmp_revtype1

string

34

RevenueType2

c.cmp_revtype2

string

35

RevenueType3

c.cmp_revtype3

string

36

RevenueType4

c.cmp_revtype4

string

37

State

c.cmp_state

string

38

Type

c.cmp_crmtype

string

39

UpdatedBy

c.cmp_updatedby

string