Commodity object

First available in SystemsLink: 2014.2

Used by External SystemsLink for TMWSuite.

Methods

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

Name

Data type (in C#)

GetCommodity

commodityCode

String

0 = successful

100 = no records found

1000 = errors occurred

Returns all Commodity objects that correspond to the provided commodity code

RetrieveCommodities

N/A

0 = successful

100 = no records found

1000 = errors occurred

Returns all the Commodity objects that meet the provided criteria

Properties and column mapping

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

c =commodity

Property Database Column Modifiable Comments

Name

Data Type (in C#)

Name

Data Type

1

Code

string

c.cmd_code

varchar(8)

Insert only

Unique and required

2

CommodityClass

string

c.cmd_class

varchar(8)

Insert/Update

3

DataSourceID

string

N/A

Not mapped

4

Description

string

c.cmd_name

varchar(60)

Insert/Update

Unique and required

5

Hazardous

int

c.cmd_hazardous

int

Insert/Update

6

IsDirty

bool

N/A

Not mapped or used in service

7

IsNew

bool

N/A

Not mapped, set to false during save to update

8

IsValid

bool

N/A

Not mapped or used in service

9

Misc1

string

c.cmd_misc1

varchar(254)

Insert/Update

10

Misc2

string

c.cmd_misc2

varchar(254)

Insert/Update

11

Misc3

string

c.cmd_misc3

varchar(254)

Insert/Update

12

Misc4

string

c.cmd_misc4

varchar(254)

Insert/Update

13

Pin

string

c.cmd_pin

varchar(8)

Insert/Update

14

UpdateableProperties

CommodityUpdateInfo

N/A

Not mapped

Commodity.ReturnObject

Property Name Data Type (in C#) Comments

1

ErrorMessages

List <string>

2

ErrorObjectIndexList

List <int>

3

Exceptions

List <Exception>

4

ReferenceObjects

List <Commodity>

5

ReturnCode

int

6

TraceMessages

List <string>

7

WarningMessages

List <string>

CommodityUpdateInfo object

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

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

Property Name

1

Code

2

CommodityClass

3

Description

4

Hazardous

5

Misc1

6

Misc2

7

Misc3

8

Misc4

9

Pin