Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 14, 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: CAN NOT INSERT VALUES
Misael Ochoa M.
Posts: 45
 
CAN NOT INSERT VALUESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Oct 08 4:38 PM
IM TRYING TO SAVE VALUES INTO A TABLE
THAT'S MY CODE:

if (entityTypeActual != null)
{
IRECEIVABLES objR = EntityFactory.Create();

objR.CreateDate = DateTime.Now;
objR.ModifyDate = DateTime.Now;
objR.CreateUser = obj.UserId;
objR.ModifyUser = obj.UserId;
objR.ReceivableType = pklReceivable.PickListValue;
objR.Receivablesid = NewID("Receivables");
obj.RECEIVABLESS.Add(objR);
obj.Notes = this.Notes.Text;
obj.Save();
}
else
{
throw new InvalidOperationException("Invalid entity type " + entityTypeActual);
}

AND WHEN OBJ.SAVE() IS EXECUTED, I GOT THIS ERROR MESSAGE:

could not insert: [Sage.SalesLogix.Entities.RECEIVABLES#QMPAAA005YI2][SQL: INSERT INTO RECEIVABLES (CREATEUSER, CREATEDATE, MODIFYUSER, MODIFYDATE, RECEIVABLETYPE, RECEIVABLESID) VALUES (?, ?, ?, ?, ?, ?)]

PLEASE CAN SOMEONE TELL ME, WHAT CAN I DO ABOUT IT?
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: CAN NOT INSERT VALUESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 08 3:58 AM
Why are you setting the Id? The entity model will try do this for you. This is probably why your save is failing...The .Save() method will create the new Id for you.
[Reply][Quote]
Stuart
Posts: 178
 
Re: CAN NOT INSERT VALUESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 08 5:10 AM
Should this line

obj.RECEIVABLESS.Add(objR);

be

obj.RECEIVABLES.Add(objR);

?
[Reply][Quote]
Misael Ochoa M.
Posts: 45
 
Re: CAN NOT INSERT VALUESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 08 9:16 AM
yeah i removed it, and it works well, thank you!
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: CAN NOT INSERT VALUESYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Oct 08 5:24 AM
Quote:
Originally posted by Misael Ochoa M.

yeah i removed it, and it works well, thank you!


The system will also take care of ModifyUser/ModifyDate/CreateUser/CreateDate so you dont need to set these manually.
[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/14/2025 5:34:27 AM