8/16/2025 7:27:19 PM
|
|
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.
|
|
|
|
Problem with update using entity model in 7.2
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 |
|
|
|
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!
|
|
|
|
|
|
|
|