Advanced Print Routing (Add DocStar Attach)

I am trying to crate an APR that adds an attachment to docstar. I get an error on the attach action saying that the object reference is not set to an instance of an object. Any help would be greatly appreciated.

You should share the entire details of the exception as it contains a stack trace with clues.

1 Like

I am not doing this in code, i am used the breaking/routing tab in report styles.

Perhaps have a look at teh Event Viewer for the Task Agent

Just a stab in the dark here, but are you 100% sure that there’s an attachment in DocStar that matches the selection parameter you specified in the APR rule action? How do you have that selection set up?

I also think we got an object reference error when I accidentally deleted some of the attachments in DocStar but not in Epicor. Does the attachment you want to use open when you click the View button on the attachments panel?

Here’s an example of a process that is working for us:
We have a set of finished parts where every time one is ordered, an autoprint job sends the order acknowledgement and a drawing with a specified type (attached to the part) to a group of people.

image

Hi Chris,

I have the same issue! DocStar and Epicor cant find what’s wrong!

Chris

I am trying to add a docStar attachment, not take a docStar attachment.

Ah - sorry - I misread the initial post. I do have an example of that working in our environment as well.

Have you checked the Document Type ID? It’s a freeform field on the attachment properties form but is a record key in Document Type Maintenance and a folder name in DocStar. A typo here might cause an object reference error.

Can you post a screenshot of how the action is configured in APR, including each of the specified options?

If you have on prem installation, you can add special trace flag for print routing to the server log, and it will show a lot of debug messages for docstar attachments processing.

I double checked the doc type id and it is PO.

OK - we basically have the same thing set up for POs as well. I’ll use that as an example and walk through the configuration from the top. Maybe something will stand out to you.

  1. Company Maintenance > Attachments

    DocStar should be enabled with the root site specified (e.g. http://servername/DocStar/). We transfer as a service and have stored the server credentials. Create the company folder if you haven’t already done so.
  2. Document Type Maintenance

    The document type should have a storage type of DocStar.
  3. DocStar
    image
    DocStar’s folder structure should be set up at this point. Log in with the credentials used for the service in step 1 and confirm that you can see the folder structure with the Company ID and the Document Type ID.
  4. Report Style

    Enable routing on the report style.
  5. Breaking & Routing Design > Break

    Break on the PONum column.
  6. Breaking & Routing Design > Add DocStar Attachment

    Add the DocStar attachment using the Document Type ID specified in step 2.
  7. Purchase Order Entry


    After running a preview of the report with the specified report style, it should show up as an attachment on the PO and in DocStar.
1 Like

Ok, now it worked. I think I could have possibly had the wrong username and password set up in company maintenance. Thanks

Do you know the flag offhand? Or where it’s documented? I didn’t see anything in the config file that looked APR specific. This could be really useful when debugging some of our more complex routing actions.

No, unfortunately I do not.

The flag is

profile://ice/fw/printrouting

It is set up in the AppServer.config file. Which is by default in the server folder.

1 Like