Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 1, 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 and update of calling page fields
John Wishart
Posts: 5
 
DialogService and update of calling page fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Nov 09 11:23 PM
I have a (ticket based) page with a button and on the click event I use the DialogService to open a smart part as a modal window. In that smart part the user can enter data and with the save button, save the new entity (a contact) and also close the modal window.
That all works fine. What I would also like to do is have the code in the save routine update a field on the calling form. I have tried passing the ticket and the form to the smart part using the DialogService.DialogParameters collection:

DialogService.DialogParameters.Add("InsertTicket_ITicket", ticket);
DialogService.DialogParameters.Add("InsertTicket_IInsertTicket", form);

Then in the Save button event I have:

Sage.Entity.Interfaces.ITicket ticket = DialogService.DialogParameters["InsertTicket_ITicket"] as ITicket;
IInsertTicket parentForm = DialogService.DialogParameters["InsertTicket_IInsertTicket"] as IInsertTicket;
if (ticket != null && parentForm != null)
{
ticket.Contact = contact;
parentForm.lueContact.LookupResultValue = contact;
DialogService.CloseEventHappened(form, args);
}
I see in the debugger that the ticket entity and lookup control are updated with the new contact, but the changes are not reflected in the calling form at all, i.e. the control is not updated nor is the ticket entity at the calling form.
Any suggestions would be appreciated.
[Reply][Quote]
Kris Halsrud
Posts: 88
 
Re: DialogService and update of calling page fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Nov 09 9:18 AM
My guess is you would need to call a postback since you have set the entity but the client side has not reloaded to reflect this, or you would need to do it client side with java script.
[Reply][Quote]
Alec Denholm
Posts: 34
 
Re: DialogService and update of calling page fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Nov 09 5:23 AM
I've experienced this before and I'm still playing with it in one development.
In the meantime though:

Are you doing a ticket.Save() after assigning the contact to ticket.Contact? If not it might just be reverting the changes to the collection.

Also I wondered if binding a new instance of an entity in another smartpart, rather than to BindingSource.Current, might mean that changes to that entity instance might not trigger an update of the one referenced in the parent smartpart. I won't know this until I've investigated further though so if anyone else knows what determines if the calling view updates after dialog intervention, please post the info! :D
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: DialogService and update of calling page fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Nov 09 2:25 PM
Quote:
Originally posted by John Wishart

I see in the debugger that the ticket entity and lookup control are updated with the new contact, but the changes are not reflected in the calling form at all, i.e. the control is not updated nor is the ticket entity at the calling form.
Any suggestions would be appreciated.


If the entity shows to be updated after the Dialog closes, then refresh the View, thus allowing it to load the fresh data:

IPanelRefreshService refresher = PageWorkItem.Services.Get();
if (refresher != null)
{
refresher.RefreshAll();
}
else
{
Response.Redirect(Request.Url.ToString());
}

[Reply][Quote]
John Wishart
Posts: 5
 
Re: DialogService and update of calling page fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Nov 09 10:15 PM
Thankyou for your responses.
I have been a little unclear. The calling page with the ticket is in insert mode, so the ticket entity referenced by the ITicket variable has a null id and does not correspond to a database record. The dialog is invoked to create a new contact and that is achieved in the save button event. In that event routine I can set the properties of the interfaces (ITicket, IInsertTicket) passed in as dialog parameters, but I think I need to handle the dialog closing event in the calling page so I can set the lookup control and ITicket variable to the new contact there.
[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): 7/1/2025 6:29:41 PM