Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 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: Capture Ctrl-D event in mainview
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Capture Ctrl-D event in mainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Nov 07 8:05 AM
I have two mainviews, mv1 and mv2. Mv2 displays some ready only data from mv1 as well as some of its own. Some of the tables associated with mv1 store an ID from the main table for mv2. When someone deletes a record in mv2 I need to clear out the ID's in mv1. So I am wondering if there is a way to capture the delete event of mv2 so I can update the ID's in other tables to null. Is this possible? Thanks
[Reply][Quote]
Vladimir
Posts: 93
 
Re: Capture Ctrl-D event in mainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Nov 07 8:55 AM
Create a new Global Script.
In script type the code:

Function OnBeforeFunctionExecute_EditDeleteItem(functionNumber, functionName)
if Application.MainViews.ActiveView.Caption = "YOUR MAIN VIEW" then

'Your Code
end if
end function


The list of standard functions you can view in SECFUNCTIONS table
[Reply][Quote]
Vladimir
Posts: 93
 
Re: Capture Ctrl-D event in mainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Nov 07 8:57 AM
I forgot. If you want "cancel" function you must return false in function body, for example:

OnBeforeFunctionExecute_EditDeleteItem = false
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Capture Ctrl-D event in mainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Nov 07 9:51 AM
Thanks Vladimir. Very helpful. Is there a way to get the ID of the record being deleted? I also need to capture this from the Edit/Delete option, I am hoping I can get the ID of detail record about to be deleted from each location..
[Reply][Quote]
Vladimir
Posts: 93
 
Re: Capture Ctrl-D event in mainviewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Nov 07 10:12 AM
You can try Application.BasicFunctions.CurrentViewID. This function returns current record ID of active mainview.

Edited.
You can also try Application.MainViews.ActiveView.CurrentID
[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): 6/20/2025 11:16:24 PM