Schedule a daily code method

Yeah just found that out now. Im looking then at the code firing on the GetList method of the Labor table

1 Like

i’ll start a new thread although, im still trying to schedule for a daily post but first i need to actually get the data and code firing :rofl::rofl:

1 Like

That worked a treat.

Get a test on going before you go further.

My test was:

BAQ

  • I made a baq, and added the ABCCode table. According to @Waffqle_De_LaCroix , that table was added especially for situations like this… :rofl:
  • Then I added some display fields, marked the BAQ as shared, and updatable.
    On the update tab, I chose Advanced BPM Update only, as I just need to run some code.
  • Clicked Actions, Run BPM Designer, Created a Post-Processing directive on GetList.
  • Gave it a name, enabled it, and chose design.
  • I added Newtonsoft.Json as a reference, and the appropriate using statement.
  • I added a variable to the main properties called “wut” and then added a custom code block.
  • In that custom code block I added the following code: crap = JsonConvert.SerializeObject(result.Results);
  • I then added an email widget, and filled it out.
  • In the body section, I right clicked and added my Scalar variable “wut”
  • Saved all the way out.

BAQ Report

  • I opened BAQ Report Designer, and filled out all that junk.
  • Selected my BAQ, and saved.
  • From Actions, I chose Preview Classic Form
  • I chose an appropriate schedule (Now for me, but…)
  • You should chose what you want that you have your system agent set for, and choose recurring, but for testing, just leave it on now.
  • Clicked the Generate Only Button
  • Opened my email and waited.

Got an email back with this as the body:

[{"ABCCode_Company":"NOPE","ABCCode_ABCCode":"A","ABCCode_CountFreq":3,"ABCCode_ExcludeFromCC":false,"ABCCode_StockValPcnt":0.0,"ABCCode_PcntTolerance":0.00,"ABCCode_CalcPcnt":false,"ABCCode_CalcQty":false,"ABCCode_CalcValue":false,"ABCCode_QtyTolerance":0.0,"ABCCode_ValueTolerance":0.0,"ABCCode_ShipToCustNum":0,"ABCCode_SysRowID":"8429abd7-2649-4201-ac11-e2df2a9cd71a","RowMod":"","RowIdent":"8e94c511-bec1-49d4-bb68-a23c11810feb","SysRowID":"8e94c511-bec1-49d4-bb68-a23c11810feb","SpecifiedProperties":"/98A","UserDefinedColumns":{}},{"ABCCode_Company":"NOPE","ABCCode_ABCCode":"B","ABCCode_CountFreq":7,"ABCCode_ExcludeFromCC":false,"ABCCode_StockValPcnt":0.0,"ABCCode_PcntTolerance":0.00,"ABCCode_CalcPcnt":false,"ABCCode_CalcQty":false,"ABCCode_CalcValue":false,"ABCCode_QtyTolerance":0.0,"ABCCode_ValueTolerance":0.0,"ABCCode_ShipToCustNum":0,"ABCCode_SysRowID":"d1840ac1-789e-406a-af2f-9bbbc1e77f70","RowMod":"","RowIdent":"88f5ba4b-e8b1-4064-ba02-49f36a3a8c33","SysRowID":"88f5ba4b-e8b1-4064-ba02-49f36a3a8c33","SpecifiedProperties":"/98A","UserDefinedColumns":{}},{"ABCCode_Company":"NOPE","ABCCode_ABCCode":"C","ABCCode_CountFreq":14,"ABCCode_ExcludeFromCC":false,"ABCCode_StockValPcnt":0.0,"ABCCode_PcntTolerance":0.00,"ABCCode_CalcPcnt":false,"ABCCode_CalcQty":false,"ABCCode_CalcValue":false,"ABCCode_QtyTolerance":0.0,"ABCCode_ValueTolerance":0.0,"ABCCode_ShipToCustNum":0,"ABCCode_SysRowID":"1abd15cd-61d5-4a32-ada8-4869eb7997fd","RowMod":"","RowIdent":"d8c90781-c040-4f65-86cd-5d25f76d2f98","SysRowID":"d8c90781-c040-4f65-86cd-5d25f76d2f98","SpecifiedProperties":"/98A","UserDefinedColumns":{}},{"ABCCode_Company":"NOPE","ABCCode_ABCCode":"D","ABCCode_CountFreq":30,"ABCCode_ExcludeFromCC":false,"ABCCode_StockValPcnt":0.0,"ABCCode_PcntTolerance":0.00,"ABCCode_CalcPcnt":false,"ABCCode_CalcQty":false,"ABCCode_CalcValue":false,"ABCCode_QtyTolerance":0.0,"ABCCode_ValueTolerance":0.0,"ABCCode_ShipToCustNum":0,"ABCCode_SysRowID":"ee543161-d93a-4129-9266-882da9ee105f","RowMod":"","RowIdent":"aaf470ed-e707-4ccd-89e5-a3952ac0cb84","SysRowID":"aaf470ed-e707-4ccd-89e5-a3952ac0cb84","SpecifiedProperties":"/98A","UserDefinedColumns":{}},{"ABCCode_Company":"NOPE","ABCCode_ABCCode":"E","ABCCode_CountFreq":45,"ABCCode_ExcludeFromCC":false,"ABCCode_StockValPcnt":0.0,"ABCCode_PcntTolerance":0.00,"ABCCode_CalcPcnt":false,"ABCCode_CalcQty":false,"ABCCode_CalcValue":false,"ABCCode_QtyTolerance":0.0,"ABCCode_ValueTolerance":0.0,"ABCCode_ShipToCustNum":0,"ABCCode_SysRowID":"542e8e01-4449-42af-85a7-3e0c8913f133","RowMod":"","RowIdent":"7b530f12-c54a-4eaf-ba4f-dfcebb212758","SysRowID":"7b530f12-c54a-4eaf-ba4f-dfcebb212758","SpecifiedProperties":"/98A","UserDefinedColumns":{}},{"ABCCode_Company":"NOPE","ABCCode_ABCCode":"F","ABCCode_CountFreq":60,"ABCCode_ExcludeFromCC":false,"ABCCode_StockValPcnt":0.0,"ABCCode_PcntTolerance":0.00,"ABCCode_CalcPcnt":false,"ABCCode_CalcQty":false,"ABCCode_CalcValue":false,"ABCCode_QtyTolerance":0.0,"ABCCode_ValueTolerance":0.0,"ABCCode_ShipToCustNum":0,"ABCCode_SysRowID":"ac4f5cb9-1f59-4611-8eb4-1ee30c3b713f","RowMod":"","RowIdent":"85b26012-45c0-4793-b260-fc25fe6b828e","SysRowID":"85b26012-45c0-4793-b260-fc25fe6b828e","SpecifiedProperties":"/98A","UserDefinedColumns":{}},{"ABCCode_Company":"NOPE","ABCCode_ABCCode":"G","ABCCode_CountFreq":90,"ABCCode_ExcludeFromCC":false,"ABCCode_StockValPcnt":0.0,"ABCCode_PcntTolerance":0.00,"ABCCode_CalcPcnt":false,"ABCCode_CalcQty":false,"ABCCode_CalcValue":false,"ABCCode_QtyTolerance":0.0,"ABCCode_ValueTolerance":0.0,"ABCCode_ShipToCustNum":0,"ABCCode_SysRowID":"1944b5e1-a85d-4220-9173-ce2c77f74d1c","RowMod":"","RowIdent":"d85520f4-8653-45c8-8e5f-7dbb4824d4ed","SysRowID":"d85520f4-8653-45c8-8e5f-7dbb4824d4ed","SpecifiedProperties":"/98A","UserDefinedColumns":{}}]