Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 28, 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: RecordChanges with Custom Mainview
Scott Smallbeck
Posts: 62
 
RecordChanges with Custom MainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Aug 08 5:12 AM
On a custom mainview if you select RecordChanges it does create a History record which was a nice suprise. Of course there are no ID's populated so it does not apear in the Notes\History tab created for the new mainview. I have added an ID field for the new table to the History table and am looking for how others may have populated the value.

Looking at the global activity script now for a good place to update the newly created History record.

[Reply][Quote]
Scott Smallbeck
Posts: 62
 
Re: RecordChanges with Custom MainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Aug 08 9:15 AM
Here's what I ended up with:

1. Set a global in the onValidate event of each custom mainview with the ID Field and Value to update for any database changes.
2. Added an update in the Global Activity Application_AfterCreateHistory Sub to check if a global exists and if so update the newly created history record.
3. Clear the global in the mainview's onAfterPost event.
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: RecordChanges with Custom MainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 10:37 AM
I'm trying to do something like this myself, as I have created a new MainView to work with a new SERVICE table (not linked to a A/C/O)

I've put a popup in the global Application_AfterCreateHistory() function, and this pops up when I change something on Account or Contact, but not when I change something on my new form linked to Service.
How do I make the method fire? I seem to be stuck at step 1 above, as I'm not sure what to put in the OnValidate event to make the global function fire.

Thanks,

Mark
[Reply][Quote]
Scott Smallbeck
Posts: 62
 
Re: RecordChanges with Custom MainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 10:43 AM
Did you enable the RecordChanges property on one or more of the fields on the form (and make a change to one of them to trigger the history creation?)

The global variable in the OnValidate just contains the ID for the custom entity so you can update the history record with the ID and then be able to see it one the Notes/Histoty tab you have created for your new entity.
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: RecordChanges with Custom MainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 10:48 AM
wow - quick :D

Yes, I have that set on all fields on the form, and made some changes.

(The form's BaseTable is bound to the SERVICE table, which has a primary key of SERVICEID, and I've added a SERVICEID to the HISTORY table.)

I wasn't sure what you meant by setting global variables on the form's OnValidate - so if that's necessary I've not done that either.

Is there another way to easily insert a HISTORY record? I suppose I could just insert a new record into the table myself, but that seems a little dangerous/uneccessary/anti-DRY/etc.
[Reply][Quote]
Scott Smallbeck
Posts: 62
 
Re: RecordChanges with Custom MainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 12:29 PM
I don't remember doing anything special to get the RecordChanges to work, I will try and take a look at that database and see if anything jumps out at me.

Hopefully you will not have to resort to cycling through all the fields to see which have changed and creating a history record manually, that would be a bit of a pain.

What version are you using? I am pretty sure the database I did this on was 7.2.2.
[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/28/2025 6:01:44 AM