Thursday, November 20, 2008 ..:: Forums ::.. Register  Login
 Forums Minimize
SearchForum Home
     
  Mainstream Forums  Help  Adding a field ...
 Re: Adding a field to the quote line items
 
nyounaki
46 posts
Joined
12/11/2007

Re: Adding a field to the quote line items
Posted: 25 May 08 5:31 AM

It really was not that difficult to add a custom field to the line items.  In the table, we added a new TemplateField column added the field to both the ItemTemplate and the EditItemTemplate.


	<%# Eval("SERVICE_DATE_C") %>
	
		
	

 

Hi ,

I follow your instruction as below but still I'm not able to save the update .

I'm using 2.1

 

We then added code to methods grdMain_RowUpdating and LoadLineItems.  We mostly just copied the code that managed the DESCRIPTION field and did the exact same thing for SERVICE_DATE_C.  Just search EditLineItemsView.ascx.cs for "DESCRIPTION" and add your custom field to the next line.

In order for the custom field to get updated when the Order is saved, you will have to use our function to add the custom field to the system.  The following function performs an alter table to add the actual field to the custom table, and it adds a record to the FIELDS_META_DATA table, which is required for automatic updating of custom fields.

exec dbo.spFIELDS_META_DATA_Insert null, null, 'SERVICE_DATE', 'Service Date', 'SERVICE_DATE', 'ORDERS_LINE_ITEMS', 'date', null, 0, 0, null, null, 0;

support
2098 posts
1st
Joined
1/3/2006

Re: Adding a field to the quote line items
Posted: 25 May 08 9:39 AM

This is where it gets more complicated.  The EditLineItemsView.ascx manages the edit of the table, but it does not manage saving the data to the database.  Saving the data is handled in the EditView of Quotes, Orders or Invoices.

We have a new build coming out in the next few days that will handling the saving for you.  Please contact our support staff directly if you are interested in getting an advanced copy for testing.

 

  Mainstream Forums  Help  Adding a field ...

Forum Home  Search       

Copyright (c) 2006-2008 SplendidCRM Software, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2008 by Perpetual Motion Interactive Systems Inc.
SplendidCRM and SplendidCRM Software are trademarks of SplendidCRM Software, Inc. SugarCRM is a trademark of SugarCRM Inc. in the United States, the European Union and other countries. All other trademarks used in this web site are the property of their respective owners.