Nope, it doesn’t fire either way.
I had the code set to run synchronously, so I set it to Asynch. Now it’s giving me an error that it "Does not contain a definition for “PublishInfoMessage”. "
Actually I’m going through my actual code I’m trying to fire and it’s saying practically EVERYTHING is an error in Asynch. Does Asynch have its own syntax?
Lol - sorry. I forgot you cant use PublishMsg in async context.
With no condition before your custom code, that thing should be firing like crazy
OK It’s not returning error messages now, but it still isn’t firing. Here’s my current code:
foreach (var ttSysTaskRow in (from ttSysTaskRow in ttSysTask where ttSysTaskRow.TaskDescription == “SO Pick list” select ttSysTaskRow))
{
foreach (var SysTaskParam_iterator in Db.SysTaskParam.Where(SysTaskParam_Row=> SysTaskParam_Row.SysTaskNum == ttSysTaskRow.SysTaskNum && SysTaskParam_Row.ParamName == “OrderList”))
{
foreach (var OrderHed_iterator in Db.OrderHed.Where(OrderHed_row=>SysTaskParam_iterator.ParamCharacter.Contains(OrderHed_row.OrderNum.ToString())))
{
OrderHed_iterator.UserDate1 = DateTime.Today;
Db.Validate();
}
}
}
Here’s what I’d do at this point (shortly before ripping my hair out):
Make a data directive on SysTask. Place ONLY a custom code block. Only add the code for a single PublishInfoMsg(“I FIRED”): Then do something to generate a record in the sysTask (like run a report, part mrp, etc)
If that don’t fire, call support.
Yeah this is frustrating. Do you mean switch back to synchronous, then enter just that InfoMessage line? I did that earlier and nothing happened. Is there a different way to show messages like that in Asynch?
Also, what do I tell support? Every time I’ve mentioned any kind of BPM or customization to them they immediately shut me down and tell me to hire a contractor to do customizations for me.
Open a ticket and include ALL of your most basic info.
I have a standard data directive on the SysTask table that never fires.
<Insert Picture of Data Directive - with only the code block, no conditions>
<Insert code - presumably only the PublishInfoMsg()>
Explain the things you’ve tried to ‘trigger’ it - like running report, mrp, etc
Try to avoid giving them any information that will allow them to get sidetracked like unneeded details at this early stage
What are you suggesting about Support being sidetrac…
Alrighty, I sent the most straightforward email possible to Support. Thanks for sticking with me for so long! This thread got very large very fast.
EDIT2: It works !!! I replaced my Contains function in the innermost loop with some Array wizardry and another Foreach loop for good measure. Now my code looks like:
string[] OrderArray = new string[] {};
int[] myInts = new int[] {};
char[] Separator = {'~'};
string Orders;
foreach (var ttSysTaskRow in (from ttSysTaskRow in ttSysTask where ttSysTaskRow.TaskDescription == "SO Pick list" select ttSysTaskRow))
{
Ice.Diagnostics.Log.WriteEntry("Walrus SysTask:" + ttSysTaskRow.SysTaskNum);
foreach (var SysTaskParam_iterator in Db.SysTaskParam.Where(SysTaskParam_Row=> SysTaskParam_Row.SysTaskNum == ttSysTaskRow.SysTaskNum && SysTaskParam_Row.ParamName == "OrderList"))
{
Orders = SysTaskParam_iterator.ParamCharacter;
OrderArray = Orders.Split(Separator);
myInts = Array.ConvertAll(OrderArray, int.Parse);
foreach (int order in myInts)
{
Ice.Diagnostics.Log.WriteEntry("Walrus OrderNum1:" + order);
foreach (var OrderHed_iterator in Db.OrderHed.Where(OrderHed_Row=> OrderHed_Row.OrderNum == order))
{
Ice.Diagnostics.Log.WriteEntry("Walrus OrderNum2:" + OrderHed_iterator.OrderNum);
OrderHed_iterator.UserDate1 = DateTime.Today;
}
}
}
}
Db.Validate();
(The word Walrus is included so I have a keyword to search for in the Server Log.)
And that did it! All this chaos just to run a tiny DateTime.Now line.