I'm trying to reference an item in Sitecore. In my code, MyItem1 returns Null for {12345ABC-4784-4869-AD80-D90B07350835}.
I am able to reference the item for the "Regular User" but not for the "Special User". Could this be a permissions issue?
Note: The "special user" item exists in both the master and the web db.
Dim SCDataItemValue As String = ""
Dim ADGroupValue As String = ""
If Not Request.QueryString("type") Is Nothing AndAlso Request.QueryString("type").ToString.ToLower.Trim = "special" Then
'Get values for Special User.
SCDataItemValue = "{12345ABC-4784-4869-AD80-D90B07350835}"
ADGroupValue = "GroupAccess_Special"
Else
'Regular User.
SCDataItemValue = "{1911A077-2E41-4CAB-ADAC-1911A077EB62}"
ADGroupValue = "GroupAccess"
End If
Dim scItemID As New Sitecore.Data.ID(SCDataItemValue)
Dim MyItem1 As Sitecore.Data.Items.Item = Sitecore.Context.Database.GetItem(scItemID)