Help with BPM to auto Print (Email) the PackSlip

Hello,

I have a directive BPM that is supposed to email a copy of the PackSlip when the shipped box is checked.

I have tested my logic in the condition and it is fine.

The problen is the Auto Print.

When I trigger it, I get an error in System Monitor.

I have tested the Packslip PDF manually and it prints it fine.

The error I am getting is:

Program Ice.Services.Lib.RunTask when executing task 15995372 raised an unexpected exception with the following message: RunTask:
System.ArgumentException: Cannot set Column ‘Calc_ExecutionTime’ to be null. Please use DBNull instead.
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at Ice.Core.RptTaskBase1.SetColumnValueIfExists(DataRow row, String column, Object value) in C:\_releases\ICE\ICE4.3.200.7\Source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 191 at Erp.Internal.SR.PackingSlipPrint.SetColumnValues(String tableName, DataRow row) in C:\_releases\ERP\ERP11.3.200.0\Source\Server\Internal\SR\PackingSlipPrint\PackingSlipPrint.cs:line 2822 at Ice.Core.RptTaskBase1.RunSetColumnValuesProcess(String tableName, DataRow row) in C:_releases\ICE\ICE4.3.200.7\Source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 211
at Ice.Core.RptBase.ReportRowDataWriter.WriteRow(IRow row) in C:_releases\ICE\ICE4.3.200.7\Source\Server\Internal\Lib\TaskLib\RptBase\ReportRowDataWriter.cs:line 62
at Ice.Core.RptTaskBase`1.XMLDumpTable(IRow row, String rptTableId) in C:_releases\ICE\ICE4.3.200.7\Source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 270
at Erp.Internal.SR.PackingSlipPrint.RunProcess(Int64 Instance_TaskNum, String OutputFile) in C:_releases\ERP\ERP11.3.200.0\Source\Server\Internal\SR\PackingSlipPrint\PackingSlipPrint.cs:line 1057
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_releases\ICE\ICE4.3.200.0\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 70
at Ice.Hosting.TaskCaller.ExecuteTask() in C:_releases\ICE\ICE4.3.200.0\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 61
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_releases\ICE\ICE4.3.200.7\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 57
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_releases\ICE\ICE4.3.200.7\Source\Server\Services\Lib\RunTask\RunTask.cs:line 462

Below are the options I selected for Auto Print:

image

image

image

Any help is truly appreciated.

According to Epicare, This is a bug with printing a voided Packing Slip.
Maybe try creating a new one?

Hello,

I created a new sales order.
I then created a new customer shipment from it.
When I checked the shipped box, I get the same error in system monitor.
If I print manually, it prints fine.

Any other ideas?

Hello,

I am still having the issue and was wondering if anyone had any other ideas?

Any help is appreciated.

Try changing the “Run Schedule” to “Queued” ?
DaveO

I haven’t used auto print, but I’m confused why the PackNum is 0 constant?

That’s because I was blind and it didn’t register that it was doing that, lol.

I changed it to the Packnum and now it emails but I have have another issue.

It emails the ‘Standard - SSRS’ report instead of the custom one called ‘MPD’ and is style number 1001.

I checked in the Selected Options->Report Parameters and the StyleNumExt is set to 1001.

Is there somewhere else to set this to select the Style Number 1001?

I’ve never done this, could you tell me how you got where you are so far and I can take a look?

I have seen other posts about AutoPrint, but in my Data Directive screen, I don’t have AutoPrint, unless we need to be licensed for it or something

Edited:
Never mind, it’s under Standard Data Directive

I’m on Kinetic View, and there are 3 things I can set on the AutoPrint widget. The first let’s me search all reports and I pick the one with the Report Style I want. See screenshot.

The next configurable link is the more like the options I’m seeing from your screenshot.

2 Likes

Hello,

With your help, I finally figured this out.

I had to set the PackNum in selected options (Thought that would have defaulted to PackNum instead of 0).

Then I had to select the correct PackSlip Report. My problem was, I didn’t see the MPD report in the company I was in.

I rebuilt this BPM in the company I was in when I created the MPD report style and now I can see it as an option.

I tested and it is sending the correct report style now.

I appreciate you working through this with me. I didn’t know the report styles were tied to specific companies…

3 Likes

I believe you can make them company specific or cross company, but that will have to be confirmed

I didn’t see anywhere in the report style maintenance where you could set that.

Can you not set it here? We aren’t multicompany so it doesn’t show anything.

I don’t think that controls it as the report style I wanted to use was set to all involved companies and both valid and default are checked.

I could only see this report style when I switched to the company that the report style was originally made under.

Seems weird to me since there is no indication on the screen of an owning company.

Ah, thanks for the info. That is weird, I thought if you had multiple companies here, it would treat them the same in every company.

I thought so too. That’s part of what held me up on this BPM.

For fun, I did a BAQ on ReportStyle table.

On any report style I created, it does fill in the ‘Company’ field with the company I was in when I created it.

No idea why that would come into play…

1 Like

So do you think if you were making the Directive in the same company that you made the report style, that you can pick the default report style and fill in the Style number in the Parameters?

The way it seemed to work was you pick the report style that you want that was created in the company you are currently in.

I don’t think the parameter for Report Style does anything for you. I tried changing it to other report styles and it made no difference.

If I am wrong, maybe someone here could fill in the answer?