Writing data into trace packet

Hi,

Does anyone know how to store temporary data inside tracepack like below:

For example from the AR Invoice Entry program after loading a group and selectig an invoice, when user clicks on "Action->Invoice->Print Invoice, you can see in ata that those parameters have been added to the trace data.
I would like to add some more data and be able to read them in the code. Any idea how?

You can do it server side. Have you looked through this?

1 Like

Thanks for the quick link. Very interesting stuff. However I am trying to basically mimmick what Epicor does. I am trying to add parameters under the tracepacket tag just like the highlighted section but using client code:

image

and on client side.

What will be the source of the data you want to add?

Lets say in AR Invoice Entry, when user clicks a button, I want to add the Group ID and invoice number. Both data are available on the form.

Most all data on a form should already be available in the trace. Especially “key” fields like the AR group id. There’s an option in the trace settings to include just changed or all parameters. Choosing to include all should include everything. It’ll just make really long entries as entire datasets - even the null fields - will be included.

1 Like

I do have access to data myself on form level in the code. I am trying to pass data to a function within code (Action->print invoice). This function requires invoice number. And I am not able to add the invoice number wherever its supposed to be so that the print invoice would pick it up.

You just want what’s in your current dataset? If you look in the object explorer, it shows you how to get ahold of the current dataset.

image

1 Like

I have access to data in my dataset, I just need to pass it to a print window.

In AR Invoice Entry, when user goes to Action->Invoices->Print Invoice, Epicor send the invoice number to the print window. I want to do the exact same this in code. Pass the invoice number to print window (Mimmicking the Print Invoices)

Here is a code snippet that doesnt work:

Erp.Proxy.BO.ARInvoiceImpl bo = WCFServiceSupport.CreateImpl<Erp.Proxy.BO.ARInvoiceImpl>(_session, Epicor.ServiceModel.Channels.ImplBase<Erp.Contracts.ARInvoiceSvcContract>.UriPath);
		
string err = string.Empty;
        bo.PrePrintInvoices(edvInvcHeadList.dataView.Table.Rows[edvInvcHeadList.Row]["GroupID"].ToString(), int.Parse(edvInvcHeadList.dataView.Table.Rows[edvInvcHeadList.Row]["InvoiceNum"].ToString()), out err);
		
		LaunchFormOptions lfo = new LaunchFormOptions();
		lfo.IsModal = false;
		ProcessCaller.LaunchForm(oTrans, "ARRP6600", lfo);

“ARRP6600” is menu ID for print form but when print form appears, it does not have the invoice num, group ID parameters.