8/25/2025 12:28:20 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 writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
ItemQuantity & ItemTotalAmount fields in ItemActivityItem table
Posted: 19 Aug 08 9:20 AM
|
I added the ItemQuantity and ItemTotalAmount columns in the layout for the grid portion of the Add/Edit Ticket Activity plug in. To facilitate the calculation of the total ItemAmount immediately after entering a value in the ItemQuantity field I have the following cod snippet added:
Function grdPartsEdited(Sender, PrimaryKeyValue, FieldName, Value) If Value <> gStrPartsEdited Then gBlnPartsEdited = True End If
Dim dblPrice Dim dblQty Dim dblTotalAmt
If FieldName = "A1.ITEMQUANTITY" Or FieldName = "A1.ITEMAMOUNT" Then
dblQty = 0 dblPrice = 0
If FieldName = "A1.ITEMQUANTITY" Then
dblQty = CDbl(Value) dblPrice = CDbl(grdParts.GetFieldValue(PrimaryKeyValue, "ITEMAMOUNT"))
End If
If FieldName = "A1.ITEMAMOUNT" Then
dblQty = CDbl(grdParts.GetFieldValue(PrimaryKeyValue, "ITEMQUANTITY"))
dblPrice = CDbl(Value)
End If
dblTotalAmt = dblQty * dblPrice
grdParts.SetFieldValue PrimaryKeyValue, "ITEMTOTALAMOUNT", dblTotalAmt, False
End If
End Function
The problem I am having is when i save the data to the database the value that is in ItemTotalAmount does NOT get inserted into the table. However when i enter the Itemtotalamount Manually the value does get saved.
Any suggestions on how to rectify this?
|
|
|
|
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!
|
|
|
|
|
|
|
|