I have a project that I need to Update a UD Field on OrderHed when the SalesOrder Acknowledgment is printed and SSRSEnableRouting = true
I did a trace to find out where this occurs
Erp.Proxy.Rpt.SalesOrderAckImpl
SubmitToAgent
I was unable to figure out where to do this with a BPM and there were no options to do custom code or update fields in the ReportStyle/BreakRouting.
I am not a programmer, but any help or links to tutorials that would help me understand how to accomplish this would be greatly appreciated.
Good Plan I like it, But How do I access the SSRSEnableRouting to determine if it was true?
Can I track a report being printed and the SSRSEnableRouting = true in a BPM process?
If so where?
Just insert addition ttSysTaskParm tables. You’ll get a warning that the first dup needs to be re-named ttSysTaskParam1, and then the 2nd will be ttSysTaskParam2.
How do you link to tttables together in Custom Code?
foreach (var ttSysTaskParam_iterator in (from ttSysTaskParam_Row in ttSysTaskParam
where (string.Equals(ttSysTaskParam_Row.RowMod, IceRow.ROWSTATE_ADDED, StringComparison.OrdinalIgnoreCase))
select ttSysTaskParam_Row))
{
var ttSysTaskParamRow = ttSysTaskParam_iterator;
}
You don’t really have to link tables in code. That linking in the query was needed because the desired info was in different records within the same ttTable. But there was no way to select them in groups like the query did.
So are you saying I cannot do it in code?
I need to pull information from the tttable like the email and cc email it was sent to and the user who sent it
to update to the order header.
I have had need to link tttables in the past but couldn’t find any information on how.
Well in this situation, it looks as though I could do separate Custom Code for each one of these and update to a variable each time and then do a final custom code to update the OrderHead text field at the end, but use your idea for the beginning condition.
I think I can make this work, however if you have any info on how to link ttTables in Custom Code for future , I would appreciate the knowledge.
//This code will update the JE_JobNum_c on OrderHed
//this uses a technique called LINQ (Language Integrated Query) to have SQL-like syntax in C#
//Define your tables that we will reference below
//Ice/Erp tables can look like this
//the first part is the type, the second is the variable name
Erp.Tables.OrderHed OrderHed;
//now we are going to look for the OrderHed record that matches this variable OrdNum. Make sure to also search by company, like any SQL query. The Session object is good for this.
//this will select, in this case, a single ShipHead record from the database
OrderHed = (from OrderHed_row in Db.OrderHed
where OrderHed_row.Company == Session.CompanyID && OrderHed_row.OrderNum == OrdNum
select OrderHed_row).FirstOrDefault();
//if the record is not null, we will continue
if(OrderHed !=null)
{
//now we will set the field on the OrderHed record
OrderHed.JE_JobNum_c = "PRNTD";
}
Yes, however you have led me to learn the following.
ice.SysTaskParam = gives me the parameter info
ice.sysTaskLog = lets me know if it had an error
ice.SysRptLst = Gives me the Email info, User, Time and Render Format
I do know the code to update the OrderHed…
Just trying to figure the timing since this is a data method…
So technically I can get every thing I need from ice.SysRptLst and ice.sysTaskLog
If ice.sysTaskLog.IsError = false and (ice.SysRptLst.EmailTo or ice.SysRptLst.EmailCC or ice.SysRptLst.EmailBCC <> “”)
then update the OrderHed.UD_textfield
UPDATE: Just realized the OrderNum only exists in the ice.SysTaskParam table -
ParamInteger
Where ParamName = “OrderNum”
and I am wondering if can I link to an ice table in custom code (not sure if its different than a db.table join)
I guess it depends on which table is populated first.
My DataMethod would then need to be on the table updated last.
Mercy, every time I think I have got it, I run into another problem lol!
One thing to keep in mind is that the records in those Ice.Sys… tables might not exist very long. It is possible that the SysTaskParam records are deleted before you get a chance to use them. Or that the records in those tables don’t exist at the same time.