SharePoint 2010 – Form Error in Reusable Workflow

So you take a copy of a delivered SharePoint 2010 workflow, like the  ‘Approval – SharePoint 2010’ workflow, and you plan on making a few customization and then simply clamming it as your own and then showing it off to your coworkers.  But after publishing the workflow, and adding it to a list in your site, you try to add a Approver and/or a CC you get the following error when the page does a post back:

 1This lovely error is due to SharePoint designer security update, KB2553322 (Security update for InfoPath 2010: July 10, 2012). This error has apparently been a huge pain in developers butts all over the world and you will hear many different ways to fix it but the truth is I tried them all and this is the only solution that worked!!!

 

Solution:

Please Note: This solution will have to be performed whenever the workflow has been modified

  • In SharePoint Designer, go to All Files.

 

 

  • Navigate to:
    • Local workflows:  Workflows > select the name of the workflow.
    • Global workflows:  _catalogs > wfpub > select the name of the workflow.

 

  • Open the “Workflow Name” .xoml.wconfig.xml file.

 

 

  • Click the Edit File link.

 

  • Navigate to the “DefaultData” Section

 

 

 

  • Remove xsi:nil=”true” from the Assignee and CC Fields.

 

 

  • It should look like when you are done.

 

  •  Save the file.
Advertisements

JavaScript: Appending a parameters to url and refreshing the page.

First off this is not my code but I really wanted to share because it works great ツ

Hats off to Yeyo: http://stackoverflow.com/a/27970946

 

Add the bellow code in a script tag:


function URL_add_parameter(url, param, value){
var hash = {};
var parser = document.createElement('a');

parser.href = url;

var parameters = parser.search.split(/?|&/);

for(var i=0; i < parameters.length; i++) {
if(!parameters[i])
continue;

var ary = parameters[i].split('=');
hash[ary[0]] = ary[1];
}

hash[param] = value;

var list = [];
Object.keys(hash).forEach(function (key) {
list.push(key + '=' + hash[key]);
});

parser.search = '?' + list.join('&');
return parser.href;
}

Code to run the above function:


window.location.href = URL_add_parameter(window.location.href, 'param', 'value');

 

SharePoint: People Picker values displaying HTML Syntax in DispForm

I created a new DispForm.aspx for a document library and the people picker fields (multiple selection), by default, were displaying the HTML Syntax.

Luckily it was a really easy fix ツ

  1. Open SharePoint Designer and navigate to the library.
  2. Open the display form in Advance Mode
  3. Find the XSL code for the particular people picker
<xsl:value-of select=”@Team_x0020_Members”/>
  1. Add the following code to the end of the Tag
disable-output-escaping=”yes”
  1. The end result should look like this:
<xsl:value-of select=”@Team_x0020_Members”/>

PeopleSoft – Get List of Project items via SQL

SELECT (CASE OBJECTTYPE WHEN 0 THEN CASE ISNULL((SELECT RECTYPE FROM PSRECDEFN WHERE RECNAME = OBJECTVALUE1), 99)
 WHEN 0 THEN 'SQL Table in DB'
 WHEN 1 THEN 'SQL View in DB'
 WHEN 2 THEN 'Work Record'
 WHEN 3 THEN 'Sub Record'
 WHEN 5 THEN 'Dynamic View'
 WHEN 6 THEN 'Query View'
 WHEN 7 THEN 'Temporary Table'
 ELSE 'Other Record or Deleted' END
WHEN 1 THEN 'Index'
WHEN 2 THEN 'Field'
WHEN 3 THEN 'Field Format'
WHEN 4 THEN 'Translate Value'
WHEN 5 THEN 'Pages'
WHEN 6 THEN 'Menus'
WHEN 7 THEN 'Components'
WHEN 8 THEN 'Record PeopleCode'
WHEN 9 THEN 'Menu PeopleCode'
WHEN 10 THEN 'Query'
WHEN 11 THEN 'Tree Structures'
WHEN 12 THEN 'Trees'
WHEN 13 THEN 'Access group'
WHEN 14 THEN 'Color'
WHEN 15 THEN 'Style'
WHEN 16 THEN 'N/A'
WHEN 17 THEN 'Business process'
WHEN 18 THEN 'Activity'
WHEN 19 THEN 'Role'
WHEN 20 THEN 'Process Definition'
WHEN 21 THEN 'Server Definition'
WHEN 22 THEN 'Process Type Definition'
WHEN 23 THEN 'Job Definitions'
WHEN 24 THEN 'Recurrence Definition'
WHEN 25 THEN 'Message Catalog'
WHEN 26 THEN 'Dimension'
WHEN 27 THEN 'Cube Definitions'
WHEN 28 THEN 'Cube Instance Definitions'
WHEN 29 THEN 'Business Interlink'
WHEN 30 THEN CASE OBJECTVALUE2
 WHEN '0' THEN 'SQL Object'
 WHEN '1' THEN 'App Engine SQL'
 WHEN '2' THEN 'Record View SQL'
 WHEN '5' THEN 'Query for DDAUDIT or SYSAUDIT'
 WHEN '6' THEN 'App Engine XML SQL'
 ELSE 'SQL' END
WHEN 31 THEN 'File Layout Definition'
WHEN 32 THEN 'Component Interfaces'
WHEN 33 THEN 'AE program'
WHEN 34 THEN 'AE section'
WHEN 35 THEN 'Message Node'
WHEN 36 THEN 'Message Channel'
WHEN 37 THEN 'Message'
WHEN 38 THEN 'Approval rule set'
WHEN 39 THEN 'Message PeopleCode'
WHEN 40 THEN 'Subscription PeopleCode'
WHEN 41 THEN 'N/A'
WHEN 42 THEN 'Component Interface PeopleCode'
WHEN 43 THEN 'AE PeopleCode'
WHEN 44 THEN 'Page PeopleCode'
WHEN 45 THEN 'Page Field PeopleCode'
WHEN 46 THEN 'Component PeopleCode'
WHEN 47 THEN 'Component Record PeopleCode'
WHEN 48 THEN 'Component Rec Fld PeopleCode'
WHEN 49 THEN 'Image'
WHEN 50 THEN 'Style sheet'
WHEN 51 THEN 'HTML'
WHEN 52 THEN 'Not used'
WHEN 53 THEN 'Permission List'
WHEN 54 THEN 'Portal Registry Definitions'
WHEN 55 THEN 'Portal Registry Structures'
WHEN 56 THEN 'URL Definitions'
WHEN 57 THEN 'Application Packages'
WHEN 58 THEN 'Application Package Peoplecode'
WHEN 59 THEN 'Portal Registry User Homepage'
WHEN 60 THEN 'Problem Type'
WHEN 61 THEN 'Archive Templates'
WHEN 62 THEN 'XSLT'
WHEN 63 THEN 'Portal Registry User Favorite'
WHEN 64 THEN 'Mobile Page'
WHEN 65 THEN 'Relationships'
WHEN 66 THEN 'Component Interface Property Peoplecode'
WHEN 67 THEN 'Optimization Models'
WHEN 68 THEN 'File References'
WHEN 69 THEN 'File Type Codes'
WHEN 70 THEN 'Archive Object Definitions'
WHEN 71 THEN 'Archive Templates (Type 2)'
WHEN 72 THEN 'Diagnostic Plug In'
WHEN 73 THEN 'Analytic Model'
ELSE 'UNKNOWN OBJECT TYPE' END) AS OBJECTTYPE
, OBJECTVALUE1
, OBJECTVALUE2
, OBJECTVALUE3
, OBJECTVALUE4
, ISNULL((SELECT SQLTEXT FROM PSSQLTEXTDEFN WHERE SQLID = OBJECTVALUE1), 'N/A') AS SQLTEXT
FROM PSPROJECTITEM
 WHERE PROJECTNAME = 'CN_LOAD_PRELIMINARY_CLASS_ROLL' --- Replace w/ your project name
 ORDER BY OBJECTTYPE, OBJECTVALUE1, OBJECTVALUE2, OBJECTVALUE3;