8/18/2025 12:27:24 AM
|
|
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!
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.
|
|
|
|
Binding an Extension Table Field to a Main Entity Form
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.
|
|
|
|
Re: Binding an Extension Table Field to a Main Entity Form
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.. |
|
|
|
Re: Binding an Extension Table Field to a Main Entity Form
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. |
|
|
| |
|
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!
|
|
|
|
|
|
|
|