TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dheeraj kumar
NA
4
3.2k
use SP.UI.Modaldialog.showDialog(options); in spfx extension
Apr 9 2020 8:23 AM
Hi I'm trying to open sharepoint dialog using spfx extension in which using typing able to get the SP.UI.ModalDialog Object in ts file of the extension.
And the code #
SP.UI.ModalDialog.showModalDialog(options);
executes completely without any error. But unfortunately no dialog is visible. below is the onexecute Method of the extension.
public onExecute(event: IListViewCommandSetExecuteEventParameters): void
{
switch (event.itemId)
{
case 'COMMAND_1':
//Dialog.alert(`${this.properties.sampleTextOne}`);
let ele = document.createElement('div');
let options =
{
title: "My Dialog Title", width: 400, height: 300, url: "https://*****.sharepoint.com/sites/***/home.aspx" }; //
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
SP.UI.ModalDialog.showModalDialog(options);
break;
case 'COMMAND_2': Dialog.alert(`${this.properties.sampleTextTwo}`);
break;
default: throw new Error('Unknown command'); }
}
Any idea why the sharepoint dialog is not visible, i m trying this on modern site. Any help is highly appreciated.
Reply
Answers (
0
)
SharePoint 2013 Taxonomy Column issue.
How to stop a paused workflow in SharePoint designer.