Question
Attempts were made to embed a K2 SmartForm into a SharePoint picture control, but the following error is occurring:
"The page you're looking for doesn't exist"
Why is this occurring and how does one fix this?
Answer
The reason for this error is due to a SharePoint limitation which only allows for 256 characters to be input into a URL configuration on a SharePoint picture control. More information can be found in the following article:
https://technet.microsoft.com/en-us/library/Ff919564(v=office.14).aspx
To work around this issue do the following:
1. First access the SharePoint page that you would like to add the SharePoint picture control to.
2. Next select the 'PAGE' tab, select 'Edit'.
3. On the edit page, select the 'Insert' tab, then select Picture > From Computer:
4. Select the appropriate image, then click OK to add the image to your page.
5. You will notice that the image has now been added to the page, on the same edit page, select the image, then select the 'Link' tab found at the top of the page:
6. Next find the appropriate form that you would like to have opened when this picture link is clicked. For this example a New Form will be utilized. To find the Runtime URL of the form you will need to access K2 Designer, go to the properties of the form, then copy the Runtime URL of the form:
You will notice if you try to add the Runtime URL for the form directly into the URL configuration of the SharePoint picture control, then attempt to open a form using the image you will encounter the error message described.
7. The possible workaround to this error is to utilize a URL shortener, one example of this can be found here:
8. You will now want to place the Runtime URL for the form into the URL shortener, after a new URL has been created copy this new URL.
9. Back at the SharePoint page, paste the new URL into the URL portion of the 'LINK' tab:
10. Save the changes you have made to the page.
After you have made these changes you will want to test the picture control to ensure that the correct form is displayed. If these steps have been followed properly the picture control should open the New Form without issue.