Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Baffled by a dataform that won't commit changes
Mark Hanford
Posts: 131
 
Baffled by a dataform that won't commit changesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jan 11 9:47 AM
fiogf49gjkf0d

I'm stuck. I'm hoping it's something simple and I'm just missing it


 


I have a simple form bound to a PARENT table with a TDataGrid of records from a related CHILD table.  Double-clicking on the grid opens the data-edit form for CHILD.


CHILD is a simple construct of 5 date fields, a lookup and a picklist.


Updating any of the dates is fine, and is written back okay.  So is updating the lookup value.


The trouble is that any changes to the picklist cause the changes to be lost, and I've found a symptom (cause?) in the SlxProfiler.


The executed SQL is:


UPDATE CHILD

SET MODIFYUSER=[DBTYPE_STR,"U6UJ9A000008"],
MODIFYDATE=[DBTYPE_DBTIMESTAMP,20110118 15:30:56.000],
ASSESSMENTSTATUS=[DBTYPE_STR,"rejected"]

WHERE CHILDID=[DBTYPE_STR,"Q5FRNA08TZ2E"]
AND MODIFYUSER=[DBTYPE_STR,"U6UJ9A000008"]
AND MODIFYDATE=[DBTYPE_DBTIMESTAMP,20110118 15:24:28.000]
AND ASSESSMENTSTATUS=[DBTYPE_STR,"approved"]

As you can see, the problem seems to be that the UPDATE is getting odd additional criteria in there, meaning it only gets applied if the modify user is the same, and the status hasn't changed.


 


The edit form is summoned using:


Sub EditChild()
Dim sCurrentParent
Dim objChild

sCurrentParent = uxChildren.GetCurrentField("CHILDID")
Set objChild = Application.MainViews.Add("System:Add Edit Child", 0, False)

objChild.Caption = "Edit Child"
objChild.SetDataMode 0, sCurrentParent
 objChild.CurrentID = sCurrentParent


If objChild.ShowModal = 1 Then
'okay was clicked
End If

Set objBPCRequirement = Nothing
End Sub

 

[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Baffled by a dataform that won't commit changesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jan 11 10:36 AM
fiogf49gjkf0d

Oh wait, is that a red herring?  I was getting confused by the extra criteria because they're all "me" and all "today".  Are these in there to stop conflicting updates by other users?  So it will only succeed if nobody else has changed the record since I opened it?


If so, there's something else blocking the update.  ossibly a broken binding on my picklist control.

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Baffled by a dataform that won't commit changesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jan 11 8:51 AM
fiogf49gjkf0d

The SLX OLE DB Provider takes a snapshot of the record (that's the unjoined record that's the base table for the form) a millisecond before the update. compares it to any previously marked 'dirty' controls that are databound. creates an update statement that includes the optimistic locking WHERE clause appends.....and the ModifyDate, ModifyUser changes. Ain't that Special. I don't have any trouble with picklist controls' data bindings per se. Be advised that you can databind multiple properties....not just the Text property. You can store the Picklist Text (Item Value) to one field, the Picklist ShortText (Item Code) to another field...heck the ID value to a third field.


the update will occur for 1:1 table fields as well.


Run the SLX Profiler.exe and you'll be amazed at what you see.....but it's all right there in the yellow highlighted rows....


 


 

[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): 7/5/2025 1:25:46 PM