7/5/2025 12:30:36 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.
|
|
|
|
Auto Create Activity Follow up
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! |
|
|
| |
|
Re: Auto Create Activity Follow up
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 |
|
|
|
Re: Auto Create Activity Follow up
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
|
|
|
|
Re: Auto Create Activity Follow up
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). |
|
|
|
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!
|
|
|
|
|
|
|
|