Hello,
we are using ActiveRoles Version 7 and want generate a new custom entry for resource mailbox scheduled options on the web interface.
I have, as described in the Active Roles SDK documentation under point "Creating a Custom Entry", created the entries for edsaWIForms, edsaWIEntries and edsaWIStrings.
Following I add the Get_XXX and Set_XXX procedures to the file '<WI folder>\Public\CustomCode\Entries.vbs.
This worked, but the RegisterAttributeControl method seems not to work.
Does someone has a solution for this problem?
Regards,
Thomas Welker
Following my Entries.vbs script.
<%
' Put code for your entries here.
Sub Get_KBIT_MailboxResourcePolicy(ByRef objFormContext, ByRef objFormPage)
Dim strHTML, boolAllowConflicts, strAllowConflictsChecked, boolAllowRecurringMeetings, strAllowRecurringMeetingsChecked, boolScheduleOnlyDuringWorkHours, strScheduleOnlyDuringWorkHoursChecked, boolEnforceSchedulingHorizon, strEnforceSchedulingHorizonChecked
boolAllowConflicts = CBool(objFormContext.GetValue("edsva-MsExch-AllowConflicts"))
boolAllowRecurringMeetings = CBool(objFormContext.GetValue("edsva-MsExch-AllowRecurringMeetings"))
boolScheduleOnlyDuringWorkHours = CBool(objFormContext.GetValue("edsva-MsExch-ScheduleOnlyDuringWorkHours"))
boolEnforceSchedulingHorizon = CBool(objFormContext.GetValue("edsva-MsExch-EnforceSchedulingHorizon"))
If boolAllowConflicts = True Then
strlAllowConflictsChecked = "checked='checked'"
Else
strAllowConflictsChecked = ""
End If
If boolAllowRecurringMeetings = True Then
strAllowRecurringMeetingsChecked = "checked='checked'"
Else
strAllowRecurringMeetingsChecked = ""
End If
If boolScheduleOnlyDuringWorkHours = True Then
strScheduleOnlyDuringWorkHoursChecked = "checked='checked'"
Else
strScheduleOnlyDuringWorkHoursChecked = ""
End If
If boolEnforceSchedulingHorizon = True Then
strEnforceSchedulingHorizonChecked = "checked='checked'"
Else
strEnforceSchedulingHorizonChecked = ""
End If
strHTML = _
"<li style='list-style-type:none'><label><input type='checkbox' id='AllowConflicts' name='AllowConflicts' value='AllowConflicts' " & strAllowConflictsChecked & "> Allow conflicting meeting requests</label></li>" _
& "<li style='list-style-type:none'><label><input type='checkbox' id='AllowRecurringMeetings'name='AllowRecurringMeetings' value='AllowRecurringMeetings' " & strAllowRecurringMeetingsChecked & "> Allow repeating meetings</label></li>" _
& "<li style='list-style-type:none'><label><input type='checkbox' id='ScheduleOnlyDuringWorkHours'name='ScheduleOnlyDuringWorkHours' value='ScheduleOnlyDuringWorkHours' " & strScheduleOnlyDuringWorkHoursChecked & "> Allow scheduling only during working hours</label></li>" _
& "<li style='list-style-type:none'><label><input type='checkbox' id='EnforceSchedulingHorizon' name='EnforceSchedulingHorizon' value='EnforceSchedulingHorizon' " & strEnforceSchedulingHorizonChecked & "> Reject repeating meetings that have an end date beyond the booking window</label></li>"
Call objFormPage.Write(strHtml)
objFormPage.RegisterAttributeControl "AllowConflicts", "edsva-MsExch-AllowConflicts"
objFormPage.RegisterAttributeControl "AllowRecurringMeetings", "edsva-MsExch-AllowRecurringMeetings"
objFormPage.RegisterAttributeControl "ScheduleOnlyDuringWorkHours", "edsva-MsExch-ScheduleOnlyDuringWorkHours"
objFormPage.RegisterAttributeControl "EnforceSchedulingHorizon", "edsva-MsExch-EnforceSchedulingHorizon"
End Sub
' Save value of user four option checkboxes
Sub Set_KBIT_MailboxResourcePolicy(ByRef objFormContext)
'Dim strAllowConflicts, strAllowRecurringMeetings, strScheduleOnlyDuringWorkHours, strEnforceSchedulingHorizon, outFile
' Retrieve the value passed with the mailbox feature checkboxes
strAllowConflicts = Request("AllowConflicts")
strAllowRecurringMeetings = Request("AllowRecurringMeetings")
strScheduleOnlyDuringWorkHours = Request("ScheduleOnlyDuringWorkHours")
strEnforceSchedulingHorizon = Request("EnforceSchedulingHorizon")
Set objFSO=CreateObject("Scripting.FileSystemObject")
outFile="c:\ARS_Set_KBIT_MailboxResourcePolicy.log"
Set objFile = objFSO.CreateTextFile(outFile,True)
objFile.Write "AllowConflicts: " & strAllowConflicts & vbCrLf
objFile.Write "AllowRecurringMeetings: " & strAllowRecurringMeetings & vbCrLf
objFile.Write "ScheduleOnlyDuringWorkHours: " & strScheduleOnlyDuringWorkHours & vbCrLf
objFile.Write "EnforceSchedulingHorizon: " & strEnforceSchedulingHorizon & vbCrLf
objFile.Close
If strAllowConflicts = "AllowConflicts" Then
objFormContext.SetValue "edsva-MsExch-AllowConflicts", True
Else
objFormContext.SetValue "edsva-MsExch-AllowConflicts", False
End If
If strAllowRecurringMeetings = "AllowRecurringMeetings" Then
objFormContext.SetValue "edsva-MsExch-AllowRecurringMeetings", True
Else
objFormContext.SetValue "edsva-MsExch-AllowRecurringMeetings", False
End If
If strScheduleOnlyDuringWorkHours = "ScheduleOnlyDuringWorkHours" Then
objFormContext.SetValue "edsva-MsExch-ScheduleOnlyDuringWorkHours", True
Else
objFormContext.SetValue "edsva-MsExch-ScheduleOnlyDuringWorkHours", False
End If
If strEnforceSchedulingHorizon = "EnforceSchedulingHorizon" Then
objFormContext.SetValue "edsva-MsExch-EnforceSchedulingHorizon", True
Else
objFormContext.SetValue "edsva-MsExch-EnforceSchedulingHorizon", False
End If
End Sub
%>