Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 16, 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: Problem with update using entity model in 7.2
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Problem with update using entity model in 7.2Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Dec 08 8:05 AM
I am trying to update some data with the entity model in 7.2. This code is failing with 'System.NullReferenceException: Object reference not set to an instance of an object.' error. (This is by far my favorite error with 7.2). I can confirm that contID contains a valid contactID which exists in the sytem.

Sage.Entity.Interfaces.IContact _entcontact;
_entcontact = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.IContact>(contID);
_contact.FirstName = txtFirstName.Text.Replace("'", "''").Trim();
_entcontact.Save();


I am using almost identical code in anther smart part which is working:

Sage.Entity.Interfaces.ITicket _ticketentity;
_ticketentity = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.ITicket>(tickID);
_ticketentity.Subject = sSubject;
_ticketentity.Area = sArea;
_ticketentity.SerialNumber = serialNumber;
_ticketentity.Save();

Any thoughts on why my first code block is returning null for _entcontact? Any hints on troubleshooting? Thanks
[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/16/2025 7:55:58 PM