How save field extended by API Rest

Hi, the tittle the says it all

but explaind the question, i need save in the field shortchar01 of table QuoteHed, i try create a datarow of type “QuoteHedRow” and values assignated (drQuoteHed[“ShortChar01”] = “TY”) and call method “update”

but, created the new or update quote, and it is not save field extended

You shouldnt be creating a QuoteHedRow, instead you need to act upon an existing record. You can get a record many ways (GetByID, GetRows, etc) then you will need to modify your field and also set the RowMod = “U” before calling Update.

just pseudo code

QuoteAdapter qa = new QuoteAdaper(oTrans);
qa.BOConnect();
bool gotOne = qa.GetByID(12345); //returns one record
if(gotOne)
{
   qa.QuoteData.QuoteHed[0]["ShortChar01"] = "TY";
   qa.QuoteData.QuoteHed[0]["RowMod"] = "U";
   qa.Update();
}

qa.Dispose();

Thk Chris, but i need update this filed by API Rest

It’s the same process. Via REST, you’ll call those methods (GetByID, Update)

The only difference is you’ll need to parse the json response data to turn it into your dataset then modify it.

You dont technicallly have to GetByID first, I just find it’s useful to get the data structure. The help page of the E10 rest page will show you what data is needed to pass.

https://myserver/myInstance/api/help/

2 Likes