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!
|
|
Bypass user confirmation of new calendar event
Posted: 29 Sep 08 3:45 PM
|
How would I force a new calendar event to be automatically confirmed? (i.e. How would I make it so that another member/participant does not have to CONFIRM a new event that I have created?)
Alternatively, what are the changes made to the database when another member does CONFIRM a calendar event?
--Taf Greenstreet |
|
|
| |
|
Re: Bypass user confirmation of new calendar event
Posted: 30 Sep 08 8:20 AM
|
You did not say what version you are on. Here is some 6.x code I did a few years back that was "OnScheduledActivity". In 7.x you need to make it a global script, etc.... You should be able to extract what you need from here.
'Including Script - System:SLX Error Support sub main '*************************************************************************** ****************************** ' Description: On Scheduled Activity ' Purpose :Triggers after an activity is scheduled in the sales client. ' Called By : Sales Client.exe When Activity is scheduled ' Calls : ' Inputs : Gloabl Variable "CompletedActivityID" ' Outputs : ' Written : 05/31/03 ' Updates : 7-Apr-05 W. Shpuntoff - Autoconfirm feature '*************************************************************************** ****************************** Dim vActivityID Dim oSLX dim rs, cn, ScheduledFor, ScheduledBy, UserName On Error Resume Next Set oSLX = Application.BasicFunctions
vActivityID = oSLX.GlobalInfoFor("ScheduledActivityID") 'DNL if ErrorCheck (Application.Translator.Localize("Error accessing SalesLogix VBScript functions:")) > 0 then exit sub
'****** test ***********' ' msgbox "Testing OnScheduleActivity Script : " & vActivityID
set cn = Application.GetNewConnection set rs = cn.Execute("Select CreateUser, UserId from Activity where ActivityId = '" & vActivityId & "'") ScheduledFor = rs.Fields("UserId").Value ScheduledBy = rs.Fields("CreateUser").Value rs.close if ScheduledBy <> ScheduledFor then set rs = cn.Execute("Select UserName from UserInfo where UserId = '" & ScheduledFor & "'") UserName = rs.Fields("UserName").Value & "" rs.close If vbYes = Msgbox("Do you want to force this on to " & UserName & "'s calendar?", vbYesNo + vbInformation, "Auto-Confirm") then cn.Execute "Update User_Activity set Confirmed = 'T' where ActivityId = '" & vActivityId & "'" end if end if set rs = nothing set cn = nothing end sub
|
|
|
| |
|
Re: Bypass user confirmation of new calendar event
Posted: 30 Sep 08 8:58 AM
|
Thanks, Walter! I appreciate it!
I'm using 7.2, but I think for our model we'll be safe running a service just with that last important bit of code...
Update User_Activity set Confirmed = 'T'
Thanks again!
--Taf |
|
|
|