8/27/2025 1:27:29 PM
|
|
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.
|
|
|
|
Anyone have a better way to get the activityID from the ActivityDetailsView?
Posted: 12 Dec 08 3:54 PM
|
Hello,
I've added a datagrid to our ActivityDetailsView and when the activity is saved, I need to write the records in the datagrid to a table and associate them with activity. I've added an edtActivityID field to the screen and tried to evaluate it during the AXFormAfterPost event, but that event isn't firing for some reason.
I was able to get it to work by manually populating the edtActivityID field and I thought all was good, that was until I tried to schedule a follow-up activity while completed an activity . When I click OK on the follow-up activity dialog, the objActivity.Display method in the HistoryDetailView complains about inserting a null value in the ActivityID field.
Any ideas how to get the activityID without manually setting it?
|
|
|
|
Re: Anyone have a better way to get the activityID from the ActivityDetailsView?
Posted: 13 Dec 08 10:49 AM
|
Have done this a lot.....basically you write a script that goes after the Activity table Select Top 1 ActivityID from Activity where the Createuser = the current user order by createdate desc
we've even done some get the record based on the last MINUTE or 10 seconds kinds of stuff...but you have to play GMT UTC games with that.....again, by user.
Don't know what version you are on but take a look at the Global Activity script stuff, that's what RJ Ledger and I played with 2 years ago and it seemed to work OK at the time (there's a problem with multiple users and who the leader is but that's another can of worms).... |
|
|
|
Re: Anyone have a better way to get the activityID from the ActivityDetailsView?
Posted: 15 Dec 08 11:49 PM
|
Thanks RJ.
I ended up going with the Global Activity script stuff, specifically adding code to the Application_ActivityPostActivity and Application_ActivityEditActivity. It definately would have been much easier if the AXFormAfterPost event was triggered in the ActivityDetailsView, as it is in the HistoryDetailsView, but I will take what I've learned and move forward.
...Rob |
|
|
|
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!
|
|
|
|
|
|
|
|