Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Copper Super Contributor
Posts: 29
Registered: ‎05-01-2009

Invoke a smart part as a dialog, via JavaScript

I am able to load a custom smart part as a dialog, using the following server side code.

 

DialogService.SetSpecs(0, 0, 200, 600,
"SmartPartDialogTest");

DialogService.ShowDialog();

 

Is there any equivalent to doing this via JavaScript?

 

The 7.5p1 Quick Lookup appears to launch in a dialog. The following is used to launch such dialog via javascript.

mgr = new Sage.GroupLookupManager();

Sage.Services.addService("GroupLookupManager", mgr);

mgr.showLookup();

Moderator
Posts: 440
Registered: ‎05-07-2008

Re: Invoke a smart part as a dialog, via JavaScript

[ Edited ]

The Dialog Workspace has a client-side javascript API, as follows:

 

The dialog workspace supports this directly:

 

/* simple */

DialogWorkspace.show('InsertNote');

 

/* with additional parameters */

DialogWorkspace.show({

    id: 'InsertNote',

    width: '500',

    height: '500'

});

 

/* full parameter object */

{

                id: 'SmartPartId',

                width: '500',

                height: '500',

                top: '200',

                left: '200',

                entityType: 'type, assembly',

                entityId: 'DEMO12345678',

                caption: 'My Title',

                keyNames: 'key1,key2',

                parameters: {

                                paramA: 'one',

                                paramB: 'two'

                }

}

 

 

This will be included in our new 7.5.2 documentation.

 

 

 

Message Edited by jperona on 06-17-2009 12:00 PM

John Perona

Director, Infor CRM Development

Infor CRM

Infor CRM

Highlighted
Copper Elite Contributor
Posts: 70
Registered: ‎04-30-2009

Re: Invoke a smart part as a dialog, via JavaScript

Hey John,

 

Thanks, it worked great. Just one question:

 

I noticed that the top and left parameters are being ignored. The dialog is always opening in the center. Any ideas?

 

Thanks!

~ Henry

Moderator
Posts: 440
Registered: ‎05-07-2008

Re: Invoke a smart part as a dialog, via JavaScript

That's a defect and it's been logged for 7.5.2. Defect# 1-69861

 

John Perona

Director, Infor CRM Development

Infor CRM

Infor CRM

Silver Contributor
Posts: 764
Registered: ‎04-17-2009

Re: Invoke a smart part as a dialog, via JavaScript


@jperona wrote:

The Dialog Workspace has a client-side javascript API, as follows:

 

The dialog workspace supports this directly:

 

/* simple */

DialogWorkspace.show('InsertNote');

 

/* with additional parameters */

DialogWorkspace.show({

    id: 'InsertNote',

    width: '500',

    height: '500'

});

 

/* full parameter object */

{

                id: 'SmartPartId',

                width: '500',

                height: '500',

                top: '200',

                left: '200',

                entityType: 'type, assembly',

                entityId: 'DEMO12345678',

                caption: 'My Title',

                keyNames: 'key1,key2',

                parameters: {

                                paramA: 'one',

                                paramB: 'two'

                }

}

 

 

This will be included in our new 7.5.2 documentation.

 

 

 

Message Edited by jperona on 06-17-2009 12:00 PM

 

Did this make it in 7.5.2?  I forgot to check in the RC... until today when I actually need some documentation on the client-side services... 

 

The DialogWorkspace is not too bad but manipulating the group list is not trivial - would be nice to have some doc on how to do the basic tasks.

Silver Contributor
Posts: 764
Registered: ‎04-17-2009

Re: Invoke a smart part as a dialog, via JavaScript

[ Edited ]
Message Edited by ngaller on 12-10-2009 12:00 PM
New Member
Posts: 2
Registered: ‎02-11-2010

Re: Invoke a smart part as a dialog, via JavaScript

Hi,

 

Does anybody know if it is possible to resize a dialog whilst you are in the dialog (by either server side or client side)? I know when you call the dialog you can use SetSpecs and give it the int values for height and width, but calling that from the dialog itself does not work (obviously too late in the dialog lifecycle).

 

This may seem like a bizarre thing to want to do, but my scenario is complicated due to the fact you can only have one dialog window open in the dialog workspace.

 

I have two divs on a dialog, and I am showing and hiding them according to various selections (I would ideally like to open and close different dialog windows but this didnt work at all!). When I show Div A I want the dialog window to shrink accordingly and look the correct size. Vice versa, when I show Div B I want to expand the dialog window.

 

Any help greatly appreciated!

 

Thanks,

Nick

Copper Contributor
Posts: 248
Registered: ‎04-20-2009

Re: Invoke a smart part as a dialog, via JavaScript

Nick, Did you ever figure out how to resize a dialog while you are already in it? Thanks

Copper Contributor
Posts: 56
Registered: ‎02-22-2012

Re: Invoke a smart part as a dialog, via JavaScript

Hi John,

 

How can we open smartparts as Dialogs in SalesLogix 8 from the client side?

 

Regards,

 

       Marcos

 

Copper Super Contributor
Posts: 99
Registered: ‎07-04-2009

Re: Invoke a smart part as a dialog, via JavaScript

As Marco said. Does anyone know how to open a smartpart via javascript in V8.x?


Cheers
Chris Grant
Plus Consulting