for some reason the role controller's addrole procedure is returning -1. what am i doing wrong here?
Thanks in advance, here's the code:
Dim rc As New DotNetNuke.Security.Roles.RoleController
Dim ri As New DotNetNuke.Security.Roles.RoleInfo
Dim i As Integer
ri = rc.GetRoleByName(0, "CustomerContacts")
If ri Is Nothing Then
ri = New DotNetNuke.Security.Roles.RoleInfo
log.AppendLine("CustomerContacts role does not exist, adding...")
ri.RoleName = "CustomerContacts"
ri.Description = "Customer contacts for Baytek International"
ri.PortalID = 0
ri.IsPublic = False
ri.AutoAssignment = False
ri.ServiceFee = "0.0"
ri.BillingPeriod = 6
ri.BillingFrequency = "Month"
'ri.TrialFee = 0.0
'ri.TrialPeriod = 0
'ri.TrialFrequency = Nothing
i = rc.AddRole(ri)
Else
log.AppendLine("CustomerContacts role exists, skipping...")
End If