cancel
Showing results for 
Search instead for 
Did you mean: 

Update OITM

fbio_bilicki
Active Contributor
0 Kudos

Hi,

Does anyone have a simple example in C # for me to update a field of OITM using SDK (Example OITM->ItemName)?

I can connect and read the data using the SDK samples, just can not update fields

Regards

Fabio.

View Entire Topic
edy_simon
Active Contributor
0 Kudos

Hi Fabio,

Simply put the properties you want to change and call the Update() method.

            oItem.GetByKey("ItemCode");  

            oItem.ItemName = "Changed Item Name";

            int lErr = oItem.Update();

Note that some properties are read only, and some properties cannot be changed after that specific Item is used in transactions.

Check the lErr for the result, when 0 = Successful update.

Regards

Edy

fbio_bilicki
Active Contributor
0 Kudos

Thank's, worked perfectly