CS0120 Options for Calculated fields

I was having a discussion in another post but it was getting too long and I figured this might be a good post for others to find. Trying to grab a lot of data from Sage, and I was pointed to CSO120. It's been great so far, but I've run into a couple snags. The biggest is some of the fields I need that were in the View OEORDH and other views are not returned in CS0120 because they're calculated. The fields are TAMOUNT1 & SHINETWTX in the case of OEORDH

I'm not sure 100% how to get these directly from the database or if it's going to be too much of a pain. I think tax amount 1 would be the sum of tax amount 1 on line items but I'm not 100% sure and it doesn't seem to match what is being returned from TAMOUNT1

Because I have to pull a lot of orders, products..etc. It can be slow if I don't use CS0120

My options are:

  1. Just use browse/fetch to get all the order views I need and their calculated field (very slow, like minutes)
  2. Use CS0120 to get all the ID's I need, then just query one at a time using unique ID and read for the calculated fields - I sort of think this would still be slow though
  3. Only use CS0120, but someone would have to tell me how to calculate the TAMOUNT1 & SHINETWTX - If it's too difficult to do manually, it might not be a viable option

Just wondering other thoughts or explain if it's feasible to calculate these fields on my own. What do others do?

Parents Reply Children
  • in reply to Jay Converse Acumen

    1. I have to query on non-indexed fields which is why I thought maybe option #2 would be faster
    3. I'm not 100% sure on how to calculate TAMOUNT & SHINETWTX manually. Is it just order details line items tax and ship amounts totaled up? Is TAMOUNT1 the sum of TAX AMOUNT 1 in the OEORDD table ? I don't see a shipment details table for SHINETWTX