Can anyone tell me how I can imitate the bizUser.WhoAmI? I am writing an
app to access the CRM object model. I've used the examples from the CRM SDK.
I need to run from my local development machine and access CRM.
I may have the merchantid in CUserAuth wrong, can anyone tell me what DB
Column this is tied to?
I am getting an Unathorized Error, I am sure that the UserID I am using is
correct and has admin rights.
I've tried the following:
Dim bizUser As mcp.BizUser = New mcp.BizUser
bizUser.Credentials = System.Net.CredentialCache.DefaultCredentials
bizUser.Url = strDir + "BizUser.srf"
Dim account As MCP.CRMAccount = New MCP.CRMAccount
account.Credentials = System.Net.CredentialCache.DefaultCredentials
account.Url = strDir + "CRMAccount.srf"
Dim strAccountId As String = "accountid here"
Dim userAuth As New mcp.CUserAuth
userAuth.UserId = "userid here"
userAuth.MerchantId = "ownerbusinessunitid here"
' Set up the columns that you want to retrieve
Dim strColumnSetXml As String = "<columnset>"
strColumnSetXml += "<column>name</column>"
strColumnSetXml += "<column>accountid</column>"
strColumnSetXml += "</columnset>"
'Retrieve the account
Dim strResultXml As String = account.Retrieve(userAuth, strAccountId,
strColumnSetXml)
Thanks in Advance,
Rick