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 general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
|
|
|
|
Tracking a Merge
Posted: 09 Oct 07 10:02 AM
|
I'd like to track when accounts and contacts are merged. I also wanted to track when those records were deleted, and I found the function in the Global Script called Global System, so I got that working. However, I don't know of any script or event that fires when a merge takes place, and I was wondering if anyone found a way to track merges, or if they know of any script that will handle a merge event. I looked in the main view plugins, and I tried to create a handler for the PopupMenu Click, but it doesn't fire. I'm guessing it's because the popup menu is connected to a function. I thought about changing the code behind that and firing the function when the popup menu is clicked, but I don't know if that will work, and I'm worried it will remove the permissions functionality and not block those individuals who should not have merge permissions. |
|
|
|
Re: Tracking a Merge
Posted: 10 Oct 07 1:52 PM
|
Ok, I got SalesLogix to fully track merges and I didn't ultimately lose permission functionality. I had to disconnect the popup menu item from the function to get the popupclick event to fire, and I did lose the permission functionality from that. Adding the permission functionality back was pretty easy though, as I setup the event handler for the popupmenu popup function, and added this line of code:
Sender.GroupsPane.PopupMenu.Items(12).Enabled = (Sender.GroupsPane.Selection.Count > 1 And Application.BasicFunctions.HasPermission("ACCOUNT", 3))
There is no difference in the way SalesLogix works, and now I have a record each time someone deletes an Account, Contact, Opportunity, or Event, and I have a record each time someone merges an Account or Contact. It's wonderful! I told my wife about it, and she accused me of being Big Brother Now, come on, would I be a good administrator if I didn't know what was going on in the system? |
|
|
|
Re: Tracking a Merge
Posted: 10 Oct 07 3:00 PM
|
So Jeff are you writing to the DB yourself..? Did you create a table to capture the deletion item.. or just the fact that smeone did..? Which function did you associated it to.. The OnBeforeFunctionExecute_EditDeleteItem ..?
Did you just add your code the different Cases..? which would seem to make sense. Just was wondering if you were writing just line item deleted or storing the actual data deleted..? |
|
|
|
Re: Tracking a Merge
Posted: 10 Oct 07 5:04 PM
|
I am writing to the DB myself. Whenever something has mysteriously disappeared, people have asked certain questions, so I added the fields that answer those questions - I don't record the entire record. The fields I record are CREATEUSER, CREATEDATE, MODIFYUSER, MODIFYDATE, SLXACCOUNTID, SLXCONTACTID, SLXOPPORTUNITYID, SLXMSIE_EVENTID, SLXACCOUNT, SLXEVENTNAME, RECORDCREATEDATE, RECORDCREATEUSER, PHONE, EMAIL, CITY, STATE, and ACTIONPERFORMED.
Yes, the function I used was OnBeforeFunctionExecute_EditDeleteItem. I grab record information from the database, and then I save that information to the table I created. If there is ever an error saving the information to the database, then I don't allow the deletion to occur. I just tell the user to try again or notify the SalesLogix administrator.
And yes, I added the code to each case, because I had to write a separate set of commands for each case due to the slightly different information in each instance.
And now, if someone in accounting comes in and says, "We seem to be missing the account for so and so," I can look and say, yep, his account was deleted by ------ two days ago.
It's really nice that there is an event to hook into for deleting things. I wish there was something like that for the merges as well. It would be nice to know which account was the primary and which one was merged. I have yet to figure that little one out. |
|
|
|
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!
|
|
|
|
|