Sharepoint 2010 – Exporting config settings for all lists, workflows, and libraries

Is there a way to export the design/setup of all my lists, libraries and workflows? I’m looking for something kind of like this:

List 1:

Permissions:   Columns: Associated Workflows: 

Workflow 1:

Starts when item is edited Associated List 

Anything remotely like this?

Thanks

Sharepoint 2010 Query List with SPD Workflow?

Working in Sharepoint 2010, I have to create a Sharepoint Designer Workflow to query all the items in a list. I want to query the list and sort the results from highest to lowest based on project ID. From this I want to be able to find the highest value for project ID among all the items in the list (basically which item is the most recently created) and store that in a variable. I will use this variable to increment the value so I can set the project ID of the next item and so on. Additionally I cannot use the OOTB ID field which is why I am attempting to create an equivalent via workflow.

Unfortunately from my initial research it doesn’t appear SPD has an action to query a list. Is there an option that I am missing or is there a different way to be able to achieve this OOTB?

2010 – Copy user field values containing orphaned users

Good day everyone,

I need to copy documents and metadata from a library in site collection A (legacy) to another one in site collection B (brand new) via PowerShell. Lucky me, there’s is only the native metadata but the SPFieldUser ones (Author, Editor) give me a hard time.

Of course, there are many values related to people who since left the company and have their account disabled/deleted. And as the source and target site collections are different, they don’t rely on the same User Information List, making things really tricky to migrate them.

What I’ve tried so far :

I have no issue to copy files and folders themselves. For the sake of readability, I’ll just display the method copying metadata from $ srcItem (the original SPListItem in sitecoll A) to $ tgtItem (its copy in sitecoll B).

1. The “brute-force” way

function Copy-Metadata($  srcItem, $  tgtItem) {     $  tgtItem["Created"]  = $  srcItem["Created"]      $  tgtItem["Author"]   = $  srcItem["Author"]     $  tgtItem["Modified"] = $  srcItem["Modified"]     $  tgtItem["Editor"]   = $  srcItem["Editor"]     $  tgtItem.Update(); } 

Of course that doesn’t work properly, because User IDs don’t match between both sitecolls.

2. The “classic” way

function Copy-Metadata($  srcItem, $  tgtItem) {     $  tgtItem["Created"]  = $  srcItem["Created"]      $  tgtItem["Author"]   = $  tgtItem.Web.EnsureUser((new-object Microsoft.SharePoint.SPFieldUserValue($  srcItem.Web, $  srcItem["Author"])).User.LoginName)     $  tgtItem["Modified"] = $  srcItem["Modified"]     $  tgtItem["Editor"]   = $  tgtItem.Web.EnsureUser((new-object Microsoft.SharePoint.SPFieldUserValue($  srcItem.Web, $  srcItem["Editor"])).User.LoginName)     $  tgtItem.Update(); } 

Works great for active users, but raises the following exception for orphan ones : Exception calling “EnsureUser” with “1” argument(s): “The specified user domain\goneuser could not be found.

3. The “desperate” way

function Copy-Metadata($  srcItem, $  tgtItem) {     $  tgtItem["Created"]  = $  srcItem["Created"]      $  tgtItem["Author"]   = Build-SPFieldUserValue $  srcItem $  tgtItem "Author"     $  tgtItem["Modified"] = $  srcItem["Modified"]     $  tgtItem["Editor"]   = Build-SPFieldUserValue $  srcItem $  tgtItem "Editor"     $  tgtItem.Update(); }  function Build-SPFieldUserValue ($  srcItem, $  tgtItem, $  fieldInternalName) {     $  srcUser = (new-object Microsoft.SharePoint.SPFieldUserValue($  srcItem.Web, $  srcItem[$  fieldInternalName])).User     try {         $  tgtUser = $  tgtItem.Web.EnsureUser($  srcUser.LoginName)     }     catch {         New-SPUser -UserAlias $  srcUser.LoginName -DisplayName $  srcUser.Name -Web $  tgtItem.Web.Url         $  tgtUser = $  tgtItem.Web.EnsureUser($  srcUser.LoginName)     }     return $  tgtUser } 

Basically, I’m trying to explicitly add the orphan user in the target sitecoll cache, but it fails too as the New-SPUser command interrogates Active Directory, hence raising the following exception : New-SPUser : The specified user domain\goneuser could not be found.

I’m now out of ideas. Does anyone know how to achieve this ? Thank you very much.

Count number of attachments in sharepoint 2010 list using jquery

I would like a piece of that would give number of attachments in a sharepoint list using jQuery. my current code gives a count of one regardless of how many I have. Please help. See my code below:

function PreSaveAction() {     var count = 0;     var elm = document.getElementById("idAttachmentsTable");     if (elm == null || elm.rows.length == 0) {         console.log(elm);         document.getElementById("idAttachmentsRow").style.display = 'none';         var r = confirm("some text");         if (r == false) {             return false;         }         else {             return true;         }      }     else {         count++;          alert(count);         return true;     } } 

After migration from SP 2010 to SP 2013, we are facing the below mentioned issues while creating the list

After Up-gradation from SP 2010 to SP 2013, we are able to create the list. But if any one or more required fields are not filled,then the appropriate messages are also displayed but a pop up message stating “Please wait while your changes are processed” is displayed. enter image description here enter image description here It’s not allowing me to enter the required fields. Can anyone help me with this?