Hi all,
I am doing a form as an add-in to a purchased CRM using vba in Visual Studio 2008.
I have to pull data from the currently selected item in the CRM. It is working well for most of the fields but I am having trouble getting the information from one field as I do not know what the field is called.
Is there a way to pull the field names from this third party app? I have tried the code below but I get the error indicated:
Error: Public member 'Controls' on type '_ComObject' not found.
We pull the fields with objMaxRec.GetFieldValue(" <field name> ")
I am doing a form as an add-in to a purchased CRM using vba in Visual Studio 2008.
I have to pull data from the currently selected item in the CRM. It is working well for most of the fields but I am having trouble getting the information from one field as I do not know what the field is called.
Is there a way to pull the field names from this third party app? I have tried the code below but I get the error indicated:
Error: Public member 'Controls' on type '_ComObject' not found.
Code:
objMaxApp = objMaxAttach.GetApplicationObject
objMaxRec = objMaxAttach.GetCurrentRecordObject
Dim ctl As Control
For Each ctl In objMaxApp.Controls '>>> Error occurs here <<<
For Each ctl0 As Control In ctl.Controls
Debug.WriteLine(ctl0.GetType.Name)
Debug.WriteLine(ctl0.GetType.ToString)
'Debug.WriteLine(ctl0.ClientID)
Next
Next
We pull the fields with objMaxRec.GetFieldValue(" <field name> ")