Sharepoint 2010 - Custom Document ID Provider - Document ID generated - but /_layouts/DocIdRedir.aspx?ID=ID does not work - sharepoint

I use a custom document ID provider. The document id gets generated which may be seen when a new file is uploaded to one of the libraries. The Document ID column of the library displays the correct document ID as per the logic in the Document ID Provider. However, if I browse to /_layouts/DocIdRedir.aspx?ID=<<NEWID>> I get the following error message
"OPERATION COMPLETED SUCCESSFULLY" No documents with ID <> were found in this site collection.

To close this question, it was a timer job issue. There is nothing that can be done about it except change the timer execution delay.

Related

BizTalk "New" SharePoint Adapter Send Document Silent Fail

I have a BizTalk 2016 solution. It's collecting a document (Pdf or Word) from a varbinary(max) column of a Sql Server database, along with some metadata. So, the message that makes its way to the messagebox from the Sql Receive Port looks like:
<TypedPolling xmlns="http://schemas.microsoft.com/Sql/2008/05/TypedPolling/ReadyForBizTalk">
<TypedPollingResultSet0>
<TypedPollingResultSet0>
<Id>3</Id>
<DocId>104</DocId>
<Uprn>76675</Uprn>
<Address1>48 Cardinal Square </Address1>
<Address2>City</Address2>
<Address3>County</Address3>
<Postcode>AF1 5FF</Postcode>
<Title>Doc title</Title>
<DocType>Pdf</DocType>
<Version>-1</Version>
<Date>30/01/2019 14:46:26</Date>
<Description>Description</Description>
<FilePath />
<Extension>.pdf</Extension>
<SystemGenerated>false</SystemGenerated>
<Content>/9j/4AAQSkZJRgAB...</Content>
<ProcessedByBizTalk>false</ProcessedByBizTalk>
</TypedPollingResultSet0>
</TypedPollingResultSet0>
I want BizTalk to send this to send the binary document (content of the Content element) and the metadata "Title" value to a SharePoint 2013 document library. I have created a send port and configured the following properties:
Use Cleint OM = Yes
Destination Folder URL
SharePoint Site URL
Column 01 = Title
Column 01 Value = %XPATH=//Title%
I realise that I've not made any attempt to send the "Content" yet but I thought I'd try to get this simple case working first.
When I set a new rec to be collected from the Sql Server table, it is collected ok by BizTalk and I can see from Tracked Messages that a send is made through the SharePoint adaptor. There are no errors either in the BizTalk admin console or event log, but new item appears in the document library
I have a couple of questions:
Any ideas why nothing new is appearing on the doc library?
Once I'm able to persist "something" to SharePoint library, does anyone know how I can get the binary document into the library?

Microsoft Flow - Block uploading Video files to a Sharepoint site

I am an owner of a Sharepoint site and want to make sure all members of the site don't upload video files. Since SP doesn't have the ability to filter out files by Type - I want to use Microsoft Flow to do this task.
So I have created this flow which triggers on creation of new file in Documents folder of my SP site. Then it runs a Condition, which checkes the property of "File content type" - if it starts with "video/" - then it should delete the file uploaded. It looks like this:
#startsWith(triggerOutputs()['headers']['Content-Type'], 'video/')
But when I run this Flow, I then get this error:
BadRequest. The request failed. Error code: 'InvalidRequestContent'. Error Message: 'The request content was invalid and could not be deserialized: 'Unexpected character encountered while parsing value: {. Path 'details', line 1, position 455.'.'.
What am I doing wrong?
Unfortunately there is no OOTB way to configure these settings yet. Your workaround to create a flow is just what I would have suggested. Ofcourse you can also still create a workflow that does that but why old fashioned if you already made your experience with flow.
This is a known issue and I would encourage you to vote for that feature here.
In OneDrive you can restrict certain file types from syncing using the poweshell:
Set-SPOTenantSyncClientRestriction -ExcludedFileExtensions "wmf;mp4;mkv"
For your flow I would suggest to make an extra step "get file content" and use the content type you get there for your filter instead of the one from your "triggerOutputs"

When I do document preview it will logout first time?

I have liferay open office integration. My problem is when I preview any document after login first time it is logout and ask to login again. Next time it is working fine the problem persist while document preview generation and after user log first time. suppose there are 5 page of document only 2 page display other while show processing image.
Below are logs come while logout.
06:55:17,743 ERROR [ajp-bio-8009-exec-88][PollerServlet:63] No channel exists with user id 1810503
06:55:17,782 ERROR [ajp-bio-8009-exec-88][status_jsp:752] No channel exists with user id 1810503
06:55:26,360 ERROR [ajp-bio-8009-exec-95][PollerServlet:63] No channel exists with user id 1810503
06:55:26,403 ERROR [ajp-bio-8009-exec-95][status_jsp:752] No channel exists with user id 1810503
Above logs come each time when i log in.
I am using Liferay 6.2 CE GA3 + Mysql + Openoffice + xuggler.
I have seen liferay issues related with No channel exists with user id but it does not answer my question

If New Document/Media uploaded in liferay by admin, user has to get message after login

I am very new to liferay. Please help me implementing the below requirement.
Using Document and media portlet in liferay, If any new document is uploaded or uploaded document is modified(Version changed) by admin user, then
How can i identify that the particular document is modified or newly uploaded as i have to show a popup message to user based upon if any new files is uploaded or modified after log on.
That is not a little change request - this required bit more development. And here is more different variants:
Simple but nonperformance variant:
With UserLocalServiceUtil you can check the last user-login date
Similarly iterate over all documents and check last modification date
Create Liferay-Portlet that shows the list of documents with modification date after last user-login date
~
Here are the steps:
Use corresponding Document Listener i.e
DlFolderListener or DlFileEntryListener. You have to use hook to
add your listner in portal.properties.
For Example, you would need to workaround below property.
value.object.listener.com.liferay.portlet.documentlibrary.model.FileEntry
= com.my.custom.MyFileEntryListener
This class would be extending BaseModelListener<FileEntry>
Override and use onAfterUpdate method to notify appropriate audience
(users).
Now this can be done by setting this notification in user
preferences.
On user Login, check corresponding user preferences for this
notification and notify user. You can use hook LoginPostAction to read user preferences for notification.
Hope this helps.
Create customfield for user. Create table with service builder to store the fileEntry Id which modified.
Create DLFileEntry Listener and write
code on FileUpdate. Add DLFileEntryID in same table created in step 1. Set
custom field true for all the user.
Create LoginPostActionHook and on Check the user's flag and fetch the FileEntryId get info of that fileEntryId and display notification with all file's information. Set customfield Flag false for particular user and remove the fileentryid from table or mark them all as read.

Sharepoint task list doesn't send email on item creation

I've created a custom workflow which creates a task item when the workflow is kicked off.
alt text http://img19.imageshack.us/img19/2862/screenshot310200942100p.png
I've also created a few custom content types for the document library and task list.
For the document library:
First, I add a document library and configure it to allow custom content types. Then I add my content type, which is based off the document content type. After, I add a workflow under workflow settings. Here, I select my custom workflow, give it a name and tell sharepoint to create a New task list to store the tasks in.
For the task list:
Now that I have a sharepoint created task list, I go there and allow custom content types and make sure "Send e-mail when ownership is assigned?" is set to Yes. Then I add my two custom content types which are both based off a workflow task content type. Thats all I should do.
When I start my workflow, it does add the approval task (I'm using a CreateTaskWithContentType activity which is named createApprovalTask), but no email is sent out for the created task.
The code I'm using in the createApprovalTask activity is:
// make a new GUID for this task
createApprovalTask_TaskId = Guid.NewGuid();
// set simple properties of task
createApprovalTask.TaskProperties.AssignedTo = "a valid domain\user";
createApprovalTask.TaskProperties.Title = "Review Contract: " + approvalWorkflowActivated_WorkflowProperties.Item.DisplayName;
createApprovalTask.TaskProperties.SendEmailNotification = true;
If I create a document library and use one of Sharepoint's built-in workflows (Approval for example), and tell it to create a task list for it, when an item is added to that list, it sends out the email correctly. So, the setting for the outgoing mail server are correct, as we're receiving other emails just fine.
I'm using a SendEmail activity right after the createApprovalTask activity to send an email back to the submitter telling them we've received their approval request. The code for that is something similar to:
sendApprovalRecievedEmail.Body = emailBody;
sendApprovalRecievedEmail.Subject = emailSubject;
sendApprovalRecievedEmail.To = emailTo;
sendApprovalRecievedEmail.From = emailFrom;
This works, so the submitter receives their custom email, but the task owner never receives the task item email.
Unfortunately, our mail servers were blocking the emails for some reason. I wasted a good 2 1/2 days searching around for this problem...and it turns out our IT department didn't have their sh*t together.
Thanks everyone.
you have to make sharepoint outgoing email settings properly.
example is shown in below link
http://sharepoint-amila.blogspot.com/2008/02/outgoin-email-settings.html
if you need to send an email through the c#.net code you can use below method to send emails in custom workflows.
SPUtility.SendEmail Method (Microsoft.SharePoint.Utilities)
example is shown in below link
http://www.sharepoint-amila.blogspot.com/
Is it possible to point out a SharePoint user by "domain\user" like you do with createApprovalTask.TaskProperties.AssignedTo? Isnt the ID required?
"id;#domain\username"

Resources