Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 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: Binding an Extension Table Field to a Main Entity Form
Ronnie Martin
Posts: 26
 
Binding an Extension Table Field to a Main Entity FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Apr 09 10:13 AM
I read that it would be best to handle this programmatically.

I am very new to SLX Web, and I am having trouble pulling out the checkbox value from the extension table. (The extension table was created because in 6.2 you couldn’t add fields to the main table)

I am currently trying the following onLoad, but I am getting errors that are not very descriptive.
“System.NullReferenceException: Object reference not set to an instance of an object” at the line “if (objContactExt.ChristmasCard == true)”.
I am sure I am missing something that connects the ContactExnstion table to the main entity Contact.

//Sage.Entity.Interfaces.IContactExtension objContactExt = form.CurrentEntity as Sage.Entity.Interfaces.IContactExtension;
//if (objContactExt.ChristmasCard == true)
//{
// form.chkChristmasCard.Checked = true;
//}


I also have an onChange script running on the field 'chkChristmasCard'.

//public static void chkChristmasCard_OnChange2Step1( IContactDetails form, EventArgs args)
// {
//Sage.Entity.Interfaces.IContactExtension objContactExt = form.CurrentEntity as Sage.Entity.Interfaces.IContactExtension;
//if(form.chkChristmasCard.Checked == true)
//{
//objContactExt.ChristmasCard = true;
//}
//else
//{
//objContactExt.ChristmasCard = false;
//}

But I have a feeling that may not be correct as well.

Thanks for your help.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Binding an Extension Table Field to a Main Entity FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Apr 09 10:57 AM
Who said its better programmatically? Just bind the checkbox to the extension entity property...

anyway, your code looks alittle incorrect, you should get to the entity by:

//Sage.Entity.Interfaces.IContact con = form.CurrentEntity as Sage.Entity.Interfaces.IContact;
//if (con.ContactExtension.ChristmasCard == true)

Ive assumed your extension entity is named COntactExtension when browsing from Contact...

Should do the trick..
[Reply][Quote]
Ronnie Martin
Posts: 26
 
Re: Binding an Extension Table Field to a Main Entity FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Apr 09 11:14 AM
Yesterday I clicked the extension entity property and set it to extend the contact table, but the ContactExtension fields didnt show up. Today I didnt look to see if they where there before I started working on the code, but after reading your post I checked again and now they are options in the DataBinding list. I know they didnt show up right after I checked the box, maybe it took a bit to kick in.

Thanks for your help, sorry for the newbie question.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Binding an Extension Table Field to a Main Entity FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Apr 09 11:17 AM
No problem

Did you remember to "Build Interfaces" after adding the extension entity?

Cheers,
Nick
[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): 8/18/2025 12:42:34 AM