Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, June 30, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: DialogService.ShowDialog
Andrew James
Posts: 51
 
DialogService.ShowDialogYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 May 10 9:02 AM
Hi all

I can open the AddEditAddress form using the below

DialogService.SetSpecs(500, 400, "AddEditAddress", "QAS Returned Address");
DialogService.ShowDialog();

is there a way I can pre populate some of the fields with data (i.e. with the results I have in an array returned from QAS)
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: DialogService.ShowDialogYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 May 10 10:13 AM
Hi,

You can pass parameters to the dialog:

DialogService.DialogParameters.Add(.....);

You can add an object or an array whatever. When you pick the value up on the dialog (on a quickformload) just cast it as the object you are expecting, something like:

if(DialogService.DialogParameters.ContainsKey("mydialogparam"))
{
string[] test = (string[])DialogService.DialogParameters["mydialogparam"];
}

Off the top of my head so syntax may differ slightly

Thanks,

Nick
[Reply][Quote]
Andrew James
Posts: 51
 
Re: DialogService.ShowDialogYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 May 10 8:57 AM
Thanks for the reply Nick, Syntax seems fine to

next issue

When you click on the address edit button and make a change the address is automatically updated on the account details form. When I call the addEditAddress form from a button on a seperate tab and try to update the address on the account details screen nothing happens. Can someone point me in the right direction as I can not see why? the GetParentEntity() on the onformbound method (AddEditAddress) links to the right client so I though everything else would fall into place.

thanks

Andrew
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: DialogService.ShowDialogYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 10 3:25 AM
Hmmm. Strange one. Ensure the dialog is calling a Refresh() when the close event is called. If the refresh() doesnt get called you will never see the chnage on the account detail until you do a full F5.

Thats the first thing to check...
[Reply][Quote]
Andrew James
Posts: 51
 
Re: DialogService.ShowDialogYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 10 6:42 AM
I have tried running the code in debug mode and have found the following

In the method onFormBound the below both point back to the account name I was on.
_parentEntity = GetParentEntity() as IPersistentEntity;
_parentEntityReference = _parentEntity as IComponentReference;

In the method public override ISmartPartInfo GetSmartPartInfo(Type smartPartInfoType)
if (BindingSource != null) - this is not null so moves onto next if
if (BindingSource.Current != null) - this is null so does not go into the next code which determines if its a new address or an update

In the method protected void btnSave_ClickAction(object sender, EventArgs e)
The below are all null
IPersistentEntity persistentEntity = BindingSource.Current as IPersistentEntity;
_parentEntity = GetParentEntity() as IPersistentEntity;
_parentEntityReference = _parentEntity as IComponentReference;
so the if statement is not hit which eventually gets to the save and refresh details.

I don't understand how the bindingsource is not null yet the .current is? also how can the getParentEntity etc contain the account details on form bound yet be null in the save method?
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: DialogService.ShowDialogYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 10 8:35 AM
If the BindingSource of the editaddress dialog is null then you cannot be passing the current entity and entityid to it? Check what the Eidt address hyperlink in the Address grid is passing to the edit address dialog and copy that. I assume you are only editing an address not ever adding a new one from your other tab?
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: DialogService.ShowDialogYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 10 8:35 AM
If the BindingSource of the editaddress dialog is null then you cannot be passing the current entity and entityid to it? Check what the Eidt address hyperlink in the Address grid is passing to the edit address dialog and copy that. I assume you are only editing an address not ever adding a new one from your other tab?
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/30/2025 5:22:05 AM