Report Styles and attaching to SharePoint

Not sure if this is relevant or not, but back in 10.2.400 when SharePoint attachments were added, there were some limitations as to the number of characters that were supported for the attachment. For SharePoint the path included the whole organization name and the rest of the URL.

At the time there was no solution and I ended up having to go with file storage.

It would be kinda handy to be able to add a function to breaking and routing.

1 Like

I’ve had some conversations with the big guys on it, but still need to write up my idea and get the process going. Know a couple of the usual suspects working that angle too.

3 Likes

Excellent point, @hally. One of the mindset changes when moving from a Network Share to SharePoint is to utilize metadata instead of overly descriptive file names and deep folder structures. SharePoint Views are quite powerful with grouping, sorting, and filtering which makes URLs shorter.

If you use the SharePoint link type, everything goes into one Document Library and the folder structure is the same as file storage (company/table/files).

1 Like

Ok, seeing your on 11.X, I would do the following.

Use the data directive as your trigger only, and put all of the code in a function library. It’s a lot easier to manage that way.

Ok, share what you got, AND the exact way you would prefer the process to work, and we’ll go from there.

If it’s interesting enough, we may even make it into a code example.

3 Likes

But you get the power of SharePoint Searching…

2 Likes

You get the power of SharePoint search no matter how many document libraries. With more document libraries, you get multiple Document Types so only the metadata that applies to that Doc Type is used. You also get finer security and retention control like the ECM people get without a lot of work (breaking inheritence, etc.), I think anyone can access any document in the one SharePoint library. :thinking:

1 Like

And that was one of my issues. In particular we had customer contract information that needed to be private so we had a separate setup for those doc types if I recall.

Sorry for hijacking @Ricky90

1 Like

I think I figured out how to set up more than one library, I’ll go poke at it later.

2 Likes

Apologies, i have been on annual leave.
I have reviewed the code again and the problem I am having is relating this to the Order Hed table not the Job Head table.
I figured i could replace Job with Order and add the relevant services into the references.

Hi, is this still something you could help with please?

1 Like

Yep, this thread turned into a jumble :dumpster_fire: .

Sure Ricky.

Last we left off, you wanted to push an attachment triggered off of a data directive when a field changes on orderHed correct?

Lay out all the details in one post, and post anything you got.

I’ll see if I can help.

Thank you.

Yes, there are 2 seperate attachments created, 1 the Order Confirmation and a 2nd document which is a custom built ssrs report.

CustomField_c changes to True then the 2 documents are emailed to the customer but also added to the Order as an attachment and I want them stored in SharePoint Library.

The Library is currently working and in use for manually added attachments just not these attachements created by a data directive and Report Style Break/Routing.

I threw your code into a Function but i couldnt make the necessary changes to get the Syntax Ok box.

1 Like

Roger. I should be in the office in a couple of hours.

Any more detail you can provide would be helpful.

I am curious to know how the whole process flows.

We have a check box which forces a line count check against a manually entered number…a small verification that the lines entered on the order match the one from a customers purchase order.

once that number and the count of lines match the check box is allowed to be set to True. This is then used on fulfilment workbench BAQ search in order to push the order out into the warehouse. (Rather than Ready to Fulfil).

Once that check box is set to false the below data directive is run.

The documents are then run through the Routing n Report style.
Which emails and attachs via DocStar.

image

Thats as simple as i can put the process.

1 Like

Ok, well they are some things to overcome here.

You’re not going to be able to retrieve the files generated in this process, you’ll need to run them again from your directive. (Unless you want to build some kind of waiting / polling thing lol)

You could intercept it maybe in APR by adding a print to alternate report style and catching that condition in a SubmitToAgent call.

Either way, you’ll want to run the generate report again with a RunDirect for easy retrieval, or generate the report once with RunDirect and restructure to send your emails with code.

I do see you are able to use the AttachDocStar widget, which I cannot. If you can use that, we can probably grab it there in a BPM.


What do you think you want to do?

Im starting to think it may be a wise move to have the automated attachments left in DocStar (There are 3 types of automated attachments across our environment) and keep all others in the SharePoint Library. (Ideally I want all documents in 1 place)

Our end users are now used to going into Attachments across most of the programs, I dont want to upset the apple cart more than I need to by changing something that, to them, works regardless of how the backend operates.

1 Like