Solved

How to print attached customer order documents when shipment delivery note is printed


Userlevel 5
Badge +15

Is it possible to add documents to a shipment?

I am attempting to link Customer Orders to their respective shipments, so I can have documents on the Customer Orders be available for printing when shipments print their delivery notes.

I have looked into Object Connection Transformations, but the connections available do not seem to work properly. I have this error appear:

with this configuration:


Any advise would be appreciated. 

Thanks,
Bryan

icon

Best answer by heibde 19 April 2023, 07:02

View original

16 replies

Userlevel 4
Badge +9

Hi,

 

I would assume that ‘DocReferenceObject’ is missing in the Service List for LU Shipment.

 

Best regards

Heinrich

Userlevel 5
Badge +15

Hi @heibde

Thanks! I was unaware you could create your own object connection type. I added a DocReferenceObject to shipment and then created that object connection transformation, linking the shipment and customer order together. 

Now all I need to do is create a custom event to print the attached documents with the document class of 140 and 150. Is there any way I can limit the connection so only those get pulled over? I’m assuming that could take place in the object connection transformation, but I’m not sure on how to define that. If it cant be done, no worries.

Thanks again, I appreciate the help,
Bryan

Userlevel 6
Badge +14

Hi @bdoucette 

 

It is not possible to limit by document class on the object connection transformation (OCT) level. There is no way you can filter the OCT rule by certain document class. You might have to do that filtration in the custom event for print attachments.

 

PS - By looking at the screenshot for your OCT rule, you might want to change the editable field to something other than “None” since that will prevent attaching new document connections to either of the LU’s. 

Userlevel 5
Badge +15

Hi @Amila Samarasinghe 

Ah shame, but no worries. I can still filter it with my workflow/action, the only need to filter it would be to make the shipment users not be able to see any financial documents but that’s not a big issue. 

The editable tag actually didn’t appear when I created my new Object Connection Transformation after I create the Object Connection. I tested the document process afterwards and I can add documents to customer orders, which get pulled into shipments, and that’s all that’s required. 

One thing I did notice is that when I try to print these attached documents, I get the error “This operation requires the Aurena Agent to be enabled.” which is odd since I have the Aurena Agent extension for Chrome, and the platform itself is Aurena, so I’m not entirely sure what it’s asking for. Do you have any insight on how to fix this issue?

Thanks,
Bryan

Userlevel 6
Badge +14

@bdoucette 

Go to Document Management > Basic Data > User Settings and see if the agent available field is set to yes and also you can see a folder path value for “local checkout path” field. If not you might need to re install Aurena Agent by running the MSI. 

Userlevel 5
Badge +15

Hi @Amila Samarasinghe 

Thanks, I just went through and reinstalled the agent but now I’m getting this error.

 


Any advise on how to tackle this issue?​​

 

Thanks,
Bryan​​​

Userlevel 6
Badge +14

Hi @bdoucette 

Do you get this error when you click print document icon in the attachment panel? What happens when you try to view the document. Does it work? Also what is the file type you are trying to print here?

Userlevel 5
Badge +15

Hi @Amila Samarasinghe 

I get this error when I click on the print document icon yes. I can view and download the document fine. It’s a PDF and I set it to the Document class 140. 

I get this popup before the error appears though, 

“A file with that name already exists. Do you want to download another copy and overwrite it? File name: C:\Users\bryandoucette\Documents/Temp/Copy of PURCHASE_ORDER_PRINT_REP5938.0en4753.0 (140 - 1000400 - 1 - A1) - 1.PDF”

 

Thanks,
Bryan

Userlevel 6
Badge +14

This is a long shot but does the printing outside of IFS actually work in your PC? Also try setting the virtual printer “Microsoft print to PDF” as your default and see what happens. 

Userlevel 5
Badge +15

Hi @Amila Samarasinghe 

Printing works normally in IFS. We have a print agent set up to handle the printing of everything, we can preview it, save as pdf, print to a printer, etc. It works perfectly. 

I’m wondering why this printing of attached documents is not covered by that printing. Is this somehow different and requires additional configuration?

Thanks,
Bryan

Userlevel 5
Badge +15

The issue ended up being that adobe acrobat was not installed on my machine, and the Aurena Agent would attempt to open it.

The fix is to install Adobe Acrobat and have a default printer selected on your device.

I hope this helps for anyone in the future that has the same issue

Userlevel 7
Badge +30

The issue ended up being that adobe acrobat was not installed on my machine, and the Aurena Agent would attempt to open it.

The fix is to install Adobe Acrobat and have a default printer selected on your device.

I hope this helps for anyone in the future that has the same issue

That's what we try to convey in that error message 😀 I guess we need to be more detailed on how to resolve it.

Userlevel 5
Badge +15

Hi @Mathias Dahl

That might be a good idea. It wasn’t the most clear error message but after knowing how to resolve the issue, I can understand what the error message was trying to say.

On an unrelated note, in order to print a document, even from the Document Object Connection page, do we need the aurena agent? If so, how can one call the aurena agent to print a document off via a workflow? I have attempted to use the projection function - GetBulkMacroInfo, since this has a process parameter variable that is set to “PRINT” that gets called when I print off an attachment document. 

I am still having issues related to printing off all attached documents for a shipment/customer order. I’ve been going off of the Object Key that I set, but I’m still missing something I guess since it doesn’t work.

Thanks,
Bryan

Userlevel 7
Badge +30

I'm quite certain you will not be able to call the Aurena Agent from a workflow, sorry. Any printing, if it can be done at all, have to be done via/by the server, and limited to PDF files (by in some way abusing the reporting framework to do it).

 

Userlevel 5
Badge +15

Hi @Mathias Dahl,

Ah I see, that is a shame. Thank you for the information though. 

I’d like to continue looking into printing these documents, since they will all be PDFs. Can you please explain how I might go about doing that?

 

So far, I have a workflow that pulls a collection of documents that are linked to that shipment/customer order, and this workflow is tiggered by an event action I created that determines when the shipment delivery note has been printed. 

My only limitation now is actually handling the printing portion.


Thanks,
Bryan

Userlevel 7
Badge +30

I don't know how to do it I don't have time to spend finding out if it can be done, and how. You can try creating a support ticket to get some input from the team that works with reports and printing and see if they can assist. I cannot promise they will spend time on something which is not a bug though...

Reply