Launching a Dialog from Client-Side Javascript in Infor CRM Web

Launching a dialog in the DialogWorkspace is typically done via server-side code using the DialogService. However, this is also possible to do via client-side code as well. The Sage.Utility script module makes this an easy task using it’s loadDetailsDialog function.

The following code will launch a dialog with the SmartPart/Quickform with an ID of “MyContactForm” for a Contact:

Sage.Utility.loadDetailsDialog({
    entityType: 'Sage.Entity.Interfaces.IContact, Sage.Entity.Interfaces',
    smartPart: 'MyContactForm',
    dialogTitle: 'My Contact Dialog',
    isCentered: true
});

A few things to note here. You must include the quickform/smartpart on the page and you’ll use that form’s ID on the page to load it here, the same way you would from server-side code using the DialogService.

You can also pass an ID to the dialog as well using and “entityId” property.

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He’s been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!