Company object

Company 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

Name

Data Type (in C#)

Name

Data Type

Modifiable

Comments

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

This object is linked against the BookingTerminal property

10

City

int

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

CompanyID

string

c.cmp_id

varchar(8)

Insert

Required for update

17

CompanyName

string

c.cmp_name

varchar(100)

Insert/Update

18

ContactName

string

c.cmp_contact

nvarchar(40)

Insert/Update

19

Contacts

List<Contact>

Insert/Update

Reference Contact object in Contact table

20

Country

string

c.cmp_country

varchar(50)

Insert/Update

21

CreatedDate

DateTime

c.cmp_createdate

datetime

Insert/Update

22

CreditAvailable

decimal

c.cmp_creditavail

money

Insert/Update

23

CreditLimit

decimal

c.cmp_creditlimit

money

Insert/Update

24

CreditTerms

string

c.cmp_terms

char(3)

Insert/Update

25

Currency

string

c.cmp_currency

varchar(6)

Insert/Update

26

DataSourceID

string

N/A

Not mapped

27

DefaultBillTo

string

c.cmp_defaultbillto

varchar(8)

Insert/Update

28

DefaultCommodity

string

c.cmd_code

varchar(8)

Insert/Update

29

DefaultPriority

string

c.cmp_defaultpriority

varchar(6)

Insert/Update

30

DeportFlag

bool

c.cmp_depot

char(1)

Insert/Update

31

DivOfParent

string

c.cmp_mastercompany

varchar(8)

Insert/Update

32

EDI210

int

c.cmp_edi210

int

Insert/Update

33

ExternalID

int32

c.external_id

Int

Insert/Update

34

ExternalVendorType

string

c.external_type

varchar(6)

Insert/Update

35

Fax

string

c.cmp_faxphone

varchar(20)

Insert/Update

36

FreeStops

int

c.cmp_freestops

int

Insert/Update

37

FridayCloses

string

c.cmp_closes_fr

int

Insert/Update

38

FridayStarts

string

c.cmp_opens_fr

int

Insert/Update

39

Geographic

string

c.cmp_geoloc

varchar(50)

Insert/Update

40

InvoiceType

string

c.cmp_invoicetype

varchar(6)

Insert/Update

41

IsAccountOf

bool

c.cmp_accountof

char(1)

Insert/Update

42

IsActive

bool

c.cmp_active

char(1)

Insert/Update

43

IsAtHomeLocation

bool

c.cmp_athome_location

char(1)

Insert/Update

44

IsBillTo

bool

c.cmp_billto

char(1)

Insert/Update

45

IsConsignee

bool

c.cmp_consignee

char(1)

Insert/Update

46

IsDirty

bool

N/A

Not mapped or used in service

47

IsNew

bool

N/A

Not mapped, set to false during save to update

48

IsParent

bool

c.cmp_parent

char(1)

Insert/Update

49

IsPort

bool

c.cmp_port

char(1)

Insert/Update

50

IsServiceLocation

string

c.cmp_service_location

char(1)

Insert/Update

51

IsShipper

bool

c.cmp_shipper

char(1)

Insert/Update

52

IsSupplier

bool

c.cmp_supplier

char(1)

Insert/Update

53

IsValid

bool

N/A

Not mapped or used in service

54

Latitude

decimal

c.cmp_latseconds

Decimal(10,2)

Insert/Update

Versions 2014.4 and prior use int as the data type

55

Longitude

decimal

c.cmp_longseconds

Decimal(10,2)

Insert/Update

Versions 2014.4 and prior use int as the data type

56

MailToAddress1

string

c.cmp_mailto_address1

varchar(40)

Insert/Update

57

MailToAddress2

string

c.cmp_mailto_address2

varchar(40)

Insert/Update

58

MailToCity

int

c.cmp_mailto_city

int

Insert/Update

59

MailToCityName

string

c.mailto_cty_nmstct

varchar(25)

Insert/Update

60

MailToName

string

c.cmp_mailto_name

varchar(30)

Insert/Update

61

MailToState

string

c.cmp_mailto_state

varchar(6)

Read-only

62

MailToTerms1

string

c.cmp_mailto_crterm1

varchar(6)

Insert/Update

63

MailToTerms2

string

c.cmp_mailto_crterm2

varchar(6)

Insert/Update

64

MailToTerms3

string

c.cmp_mailto_crterm3

varchar(6)

Insert/Update

65

MailToZip

string

c.cmp_mailto_zip

varchar(10)

Insert/Update

66

MapAddress

string

c.cmp_mapaddress

varchar(50)

Insert/Update

67

MasterBillDays

short

c.cmp_mbdays

smallint

Insert/Update

68

MaxDunnage

int

c.cmp_max_dunnage

int

Insert/Update

69

MinCharge

decimal

c.cmp_min_charge

money

Insert/Update

70

MondayCloses

string

c.cmp_closes_mo

int

Insert/Update

71

MondayStarts

string

c.cmp_opens_mo

int

Insert/Update

72

OtherType1

string

c.cmp_othertype1

varchar(6)

Insert/Update

73

OtherType2

string

c.cmp_othertype2

varchar(6)

Insert/Update

74

OverrideStopEvents

string

c.cmp_stop_events

varchar(100)

Insert/Update

75

PalletCount

int

c.cmp_palletcount

int

Insert/Update

76

PayFrom

string

c.cmp_payfrom

varchar(8)

Insert/Update

77

Phone1

string

c.cmp_primaryphone

varchar(20)

Insert/Update

78

Phone2

string

c.cmp_secondaryphone

varchar(20)

Insert/Update

79

PrintCopies

short

c.cmp_invcopies

smallint

Insert/Update

80

PrintMailToWhenLineHaul

bool

c.cmp_MailtToForLinehaulFlag

char(1)

Insert/Update

81

PrintMailToWhenTermMatch

bool

c.cmp_mailtoTermsMatchFlag

char(1)

Insert/Update

82

RefType

string

c.cmp_reftype_unique

varchar(6)

Insert/Update

83

RevenueType1

string

c.cmp_revtype1

varchar(6)

Insert/Update

84

RevenueType2

string

c.cmp_revtype2

varchar(6)

Insert/Update

85

RevenueType3

string

c.cmp_revtype3

varchar(6)

Insert/Update

86

RevenueType4

string

c.cmp_revtype4

varchar(6)

Insert/Update

87

SaturdayCloses

string

c.cmp_closes_sa

int

Insert/Update

88

SaturdayStarts

string

c.cmp_opens_sa

int

Insert/Update

89

SlackTime

int

c.cmp_slack_time

int

Insert/Update

90

State

string

c.cmp_state

varchar(6)

Read-only

91

StpType2

string

c.cmp_stp_type2

varchar(6)

Insert/Update

92

StpType3

string

c.cmp_stp_type3

varchar(6)

Insert/Update

93

SubCompany

string

c.cmp_subcompany

varchar(6)

Insert/Update

94

SundayCloses

string

c.cmp_closes_su

int

Insert/Update

95

SundayStarts

string

c.cmp_opens_su

int

Insert/Update

96

TaxID

string

c.cmp_taxid

varchar(15)

Insert/Update

97

ThursdayCloses

string

c.cmp_closes_th

int

Insert/Update

98

ThursdayStarts

string

c.cmp_opens_th

int

Insert/Update

99

TransferType

string

c.cmp_transfertype

varchar(6)

Insert/Update

100

TuesdayCloses

string

c.cmp_closes_tu

int

Insert/Update

101

TuesdayStarts

string

c.cmp_opens_tu

int

Insert/Update

102

Type

string

c.cmp_crmtype

varchar(6)

Insert/Update

103

UpdateableProperties

CompanyUpdateInfo

N/A

Not mapped

104

UpdatedBy

string

c.cmp_updatedby

varchar(20)

Insert/Update

105

UpdatedDate

DateTime

c.cmp_updateddate

datetime

Insert/Update

106

WednesdayCloses

string

c.cmp_closes_we

int

Insert/Update

107

WednesdayStarts

string

c.cmp_opens_we

int

Insert/Update

108

Zip

string

c.cmp_zip

varchar(10)

Insert/Update

Company methods

The Return Value for all methods is Company.ReturnObject.

Internal

Parameters

Method Name

Name

Data type (in C#)

Company.ReturnObject.
ReturnCode

Description

NewCompany

N/A

0 = successful

1000 = errors occurred

Creates a new Company object in memory

NewCompanies

total

int

0 = successful

1000 = errors occurred

Created 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 specified 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

External

Parameters

Method Name

Name

Data type (in C#)

Company.ReturnObject.
ReturnCode

Description

NewCompany

tokenValue

string

0 = successful

1000 = errors occurred

Creates a new Company object in memory

NewCompanies

tokenValue

string

0 = successful

1000 = errors occurred

Created the specified number of new Company objects in memory

total

int

RetrieveCompany

tokenValue

string

0 = successful

100 = no records found

1000 = errors occurred

Returns all Company objects that meet the specified criteria

criteria

Company.Criteria

SaveCompany

tokenValue

string

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

companies

List<Company>

updateDB

bool

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

1

Address1

2

Address2

3

Address3

4

AgedInvoice

5

AltID

6

ARType

7

BillMiles

8

BookingTermianl

9

Branch

10

City

11

CityName

12

CMPMisc1

13

CMPMisc2

14

CMPMisc3

15

CMPMisc4

16

CompanyID

17

CompanyName

18

ContactName

19

Contacts

20

Country

21

CreatedDate

22

CreditAvailable

23

CreditLimit

24

CreditTerms

25

Currency

26

DefaultBillTo

27

DefaultCommodity

28

DefaultPriority

29

DeportFlag

30

DivOfParent

31

EDI210

32

ExternalID

33

ExternalVendorType

34

Fax

35

FreeStops

36

FridayCloses

37

FridayStarts

38

Geographic

39

InvoiceType

40

IsAccountOf

41

IsActive

42

IsAtHomeLocation

43

IsBillTo

44

IsConsignee

45

IsParent

46

IsPort

47

IsServiceLocation

48

IsShipper

49

IsSupplier

50

Latitude

51

Longitude

52

MailToAddress1

53

MailToAddress2

54

MailToCity

55

MailToCityName

56

MailToName

57

MailToTerms1

58

MailToTerms2

59

MailToTerms3

60

MailToZip

61

MapAddress

62

MasterBillDays

63

MaxDunnage

64

MinCharge

65

MondayCloses

66

MondayStarts

67

OtherType1

68

OtherType2

69

OverrideStopEvents

70

PalletCount

71

PayFrom

72

Phone1

73

Phone2

74

PrintCopies

75

PrintMailToWhenLineHaul

76

PrintMailToWhenTermMatch

77

RefType

78

RevenueType1

79

RevenueType2

80

RevenueType3

81

RevenueType4

82

SaturdayCloese

83

SaturdayStarts

84

SlackTime

85

StpType2

86

StpType3

87

SubCompany

88

SundayCloses

89

SundayStarts

90

TaxID

91

ThursdayCloses

92

ThursdayStarts

93

TransferType

94

TuesdayCloses

95

TuesdayStarts

96

Type

97

UpdatedBy

98

UpdatedDate

99

WednesdayCloses

100

WednesdayStarts

101

Zip

Company Criteria object

To condense the information in the 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

CompanyID

c.cmp_id

string

12

CompanyName

c.cmp_name

string

13

ContactName

c.cmp_contact

string

14

DivOfParent

c.cmp_mastercompany

string

15

Geographic

c.cmp_geoloc

string

16

IsAccountOf

c.cmp_accountof

bool?

17

IsActive

c.cmp_active

bool?

18

IsAtHomeLocation

c.cmp_athome_location

bool?

19

IsBillTo

c.cmp_billto

bool?

20

IsConsignee

c.cmp_consignee

bool?

21

IsParent

c.cmp_parent

bool?

22

IsPort

c.cmp_port

bool?

23

IsServiceLocation

c.cmp_service_location

string

24

IsShipper

c.cmp_shipper

bool?

25

IsSupplier

c.cmp_supplier

bool?

26

OtherType1

c.cmp_othertype1

string

27

OtherType2

c.cmp_othertype2

string

28

Phone1

c.cmp_primaryphone

string

29

RevenueType1

c.cmp_revtype1

string

30

RevenueType2

c.cmp_revtype2

string

31

RevenueType3

c.cmp_revtype3

string

32

RevenueType4

c.cmp_revtype4

string

33

State

c.cmp_state

string

34

Type

c.cmp_crmtype

string

35

UpdatedBy

c.cmp_updatedby

string