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: Auto Create Activity Follow up
Brian Thews
Posts: 34
 
Auto Create Activity Follow upYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Mar 09 9:46 AM
Hi, we are trying to "make" users create follow up activities - to stay in touch with clients.
We are using 7.01 - which I think is important - because we are using the Global Activity script.

I have been successful in making the Activity form(s) automatically come up after a user completes an activity.
I did that by using this code from the Global Activity script:

Sub Application_AfterCreateHistory(Activity, Sender)
AutoPhoneCallActivity Activity, HistoryID
End Sub

sub AutoPhoneCallActivity(Activity, HistoryID)
Dim objActivity
Dim Index
Dim StartTime
Dim Results
Dim ActivityType

Results = activity.ResultString
ActivityType = activity.Type
If ActivityType = 0 or ActivityType = 1 or ActivityType = 2 or ActivityType = 5 then
If Results = "Left V-Message" or Results = "Continue Follow Up" then
Index = 1 'GetActivityIndexByName(Replace(Replace(Sender.Caption, "&", ""), "...", "")) 'DNL

If Index = 0 Or Index = 1 Or Index = 2 Then
Set objActivity = Application.Activities.Add(Index, Application.BasicFunctions.CurrentUserID)
objActivity.UserID = Application.BasicFunctions.CurrentUserID
objActivity.ContactID = activity.ContactID
objActivity.ContactName = activity.ContactName
objActivity.AccountID = activity.AccountID
objActivity.AccountName = activity.AccountName
objActivity.OpportunityID = activity.OpportunityID
objActivity.OpportunityName = activity.OpportunityName
objActivity.TicketID = activity.TicketID
objActivity.Category = activity.Category
objActivity.Title = activity.Title
StartTime = DefaultStartTime(activity)
objActivity.StartTime = StartTime
objActivity.Display
End If
End If
End If
end sub



However, my question is that I am trying to default the new activity's start time - based on the previously completed activity's result.
Does anyone know how I could do this?

Thank so much!
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Auto Create Activity Follow upYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Mar 09 11:44 AM
Go get the just inserted History record's competeddate....
[Reply][Quote]
Brian Thews
Posts: 34
 
Re: Auto Create Activity Follow upYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Mar 09 2:13 PM
Thanks! I had tried that, but wasn't getting back the HistoryId - so your comment made me re-visit that idea.
I got it by the following code, in case this helps anyone.

Sub Application_AfterCreateHistory(Activity, Sender)
AutoPhoneCallActivity Activity, Activity.Key <-- This gets the last History Id
End Sub
[Reply][Quote]
Rafael S.
Posts: 66
 
Re: Auto Create Activity Follow upYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Feb 11 7:42 AM
fiogf49gjkf0d


Hi Brian!!


I know this topic its too old, but i want to do something like u did... I want to make a "automatic" activity for follow-up... But i dont want to make with the command CreateActivity because shows a dialog... i want a automatic, with no user interference... Do u know how can i do this? Im thinking in make directly by query...but if you have a easier way, i apreciate..

thanks!

Rafael

[Reply][Quote]
Brian Thews
Posts: 34
 
Re: Auto Create Activity Follow upYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Feb 11 7:54 AM
fiogf49gjkf0d

Hi Rafael,


We actually wanted to show the pop-up dialog, so they could change some properties, if they wanted to.


But, no I don't know of any other way to do that, besides what you are suggesting - just create one using SQL on the backend through the OleDB Connection.


We are doing that in other places in our code (no user interaction).

[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:14:00 PM