Has anyone managed to successfully change district using Connector in MIMS OE 4.3.1.2? My code runs successfully and produces no errors, but I end up in the same district that I started in.
I have provided a bit of my function code. Am I doing something wrong?
......
Private Function ChangeDists(newdistrict As String) As Boolean
Dim block As MIMSBlock
Dim request As MIMSRequest
Dim instance As MIMSInstance
Dim field As MIMSField
Dim reply1 As MIMSReply
Dim erroritem As MIMSError
DoEvents
Set block = gobjMIMS.Blocks.New("newdist")
block.Requests.New ("Request")
block.Requests("Request").AddFieldNameValue "_Service", "MIMS.ModifyDistrict"
block.Requests("Request").Instances.New ("Instance")
block.Requests("Request").Instances("Instance").AddFieldNameValue "District", newdistrict
On Error GoTo districterror
Set reply1 = block.Send
' this appears to work fine, reply1 returns 3 null values
gobjMIMS.Blocks.Remove ("newdist")
ChangeDists = True
Exit Function
......
After the send, function ChangeDists returns true. However, a subsequent call to method MIMS.FetchCredentials returns the same value for field "District" as before ChangeDists was called.
Any advice would be appreciated.
I have provided a bit of my function code. Am I doing something wrong?
......
Private Function ChangeDists(newdistrict As String) As Boolean
Dim block As MIMSBlock
Dim request As MIMSRequest
Dim instance As MIMSInstance
Dim field As MIMSField
Dim reply1 As MIMSReply
Dim erroritem As MIMSError
DoEvents
Set block = gobjMIMS.Blocks.New("newdist")
block.Requests.New ("Request")
block.Requests("Request").AddFieldNameValue "_Service", "MIMS.ModifyDistrict"
block.Requests("Request").Instances.New ("Instance")
block.Requests("Request").Instances("Instance").AddFieldNameValue "District", newdistrict
On Error GoTo districterror
Set reply1 = block.Send
' this appears to work fine, reply1 returns 3 null values
gobjMIMS.Blocks.Remove ("newdist")
ChangeDists = True
Exit Function
......
After the send, function ChangeDists returns true. However, a subsequent call to method MIMS.FetchCredentials returns the same value for field "District" as before ChangeDists was called.
Any advice would be appreciated.