Tuesday, December 17, 2019

How to resolve Nintex forms custom button submit AND redirect issue

We have a Nintex forms with one custom button submit then redirect to a confirmation page. When user click the button, it was redirecting to something strange. See screenshot below.

After debugging this issue, it seems like Nintex form button redirect could not resolve the link you copied from browser directly. See the screenshot below.


The solution is to copy the redirect URL from browser to notepad first, then copy to the Nintex form. This seems like trivial but took me an hour to figured out from Nintex support site.

Hope this will remind me in the future.

Thursday, December 12, 2019

How to resolve Nintex workflow email action 'The specified string is not in the form required for a subject.' error


We have a running Nintex workflow in production failed for few email actions with the error message “The specified string is not in the form required for a subject.”


 After debugging this, it seems like there is an limitation for O365 outlook that subject line cannot be folded across multiple lines. It does not seem to have the character limitation for the subject. However, no matter how long of a subject you submit, exchange will ultimately truncate the unencoded version of that subject down to 255 characters and append "...".

So in order to resolve the error listed above, we have implemented in two different palaces for our SharePoint framework solution as UI with Nintex workflow.

1. Inside SharePoint framework solution, trim and leading and trailing spaces and returns. Then also replace inside returns with space.


    let trimedTitlestring = title;
    if(title !=null){
//This javascript trim leading and trailing spaces and returns
      trimedTitle = title.trim(); 

      if (trimedTitle != null){
//This javascript replaces all 3 types of line breaks with a space 
        trimedTitle = trimedTitle.replace(/(\r\n|\n|\r)/gm," "); 
    }

//The trimedTitle will be the good subject that could be used in exchange email


2. In Nintex workflow, add a “Trim String” activity on the subject before send email.


This will ultimately resolve the email action error 'The specified string is not in the form required for a subject.'.