Global real-time multi-user apps with Azure Cosmos DB | Azure Friday
January 11, 2019
TWC9: Unlimited Free Private GitHub Repos, Python in Azure App Service, CES Highlights and more | This Week On Channel 9
January 11, 2019

SP.UI.$create_DialogOptions error after migration

Hello all,

Troubleshooting some code in this environment after migrating from 2010 to 2016. Any guidance would be appreciated.

Getting error:

Uncaught TypeError: SP.UI.$create_DialogOptions is not a function
at showAttachmentModalDialog (my.js:421)
at HTMLSpanElement.onclick (page.aspx:1)

I have a jquery button/link for adding an attachment.

It uses this little tidbit of code. creates a link to a popup for the add attachment list called requests on click.

function showAttachmentModalDialog(el) {

var itemId = $(el).attr(“itemId”);

var itemViewUrl = "../_layouts/15/Attachfile.aspx?ListId={LibraryId}&ItemId=" + itemId; 

Line421: var options = SP.UI.$create_DialogOptions();

options.title = “Add Attachment”;

options.height = 100;

options.width = 575;

options.url = itemViewUrl;

options.dialogReturnValueCallback = function (dialogResult, returnValue) {

if (dialogResult) {

var thisRequest = _.find(arrayPendingRequests, function (req) {

return req.Id === parseInt(itemId, 10);


$.when(getReqAttachments(thisRequest)).done(function (attachmentsDiv) {







submitted by /u/ryuaced
[link] [comments]

News Reporter
News Reporter
Head of Operations (Banking), Director IT Governance, Teamlead Microsoft, Service Delivery Manager. Interested in Office 365, LAMP, IT Security and much more!