• santiago
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi!
 
I'm trying to insert records inside a custom object using office toolkit 3 from excel vba. Now, when I try to modify the field MyObject(0)("RecordTypeId") = newId, execution stops and I get this error message from vba:
 
Run-time error '-2147467259 (80004005)':
Invalid field index::recordtypeid
 
Then I added a watch on MyObject to see its list of fields, everything OK but RecordTypeId wasn't on the list...
 
I checked in the Salesforce interface to check if this field was actually created inside the object: it was!... it's a standard field inside my custom object.
 
I read the docs, and here is what they (api7 as well as office3) say about the RecordTypeId field:
 
"RecordTypeId Fields

Record types are used to offer different business processes and subsets of picklist values to different Users based on their Profile settings.

Record types are configured in the Salesforce user interface. The RecordType object is read-only in the API. A client application can retrieve the list of valid record type IDs (String) for a given object by calling Query on the RecordType object.

The RecordTypeId field can contain the ID of the RecordType that is associated with a standard or custom object. Client applications can set this field in Create or Update calls. If specified in a Create or Update call, the record type ID (String) must refer to a valid record type for that object.

:: Note

The RecordTypeId field is available only if at least one record type is configured for your organization in the Salesforce user interface.

For more information about ID fields, see ID Fields".

It actually states that it is possible to set this field in Create or Update calls using the API...

Now, why is it then that there is no RecordTypeId field accesible for me? What am I doing wrong? Am I using the wrong api (API 6.0, I suppose).  What is the meaning of the Note above: how can I configure at least one record type for my organization in the Salesforce user interface?????

Help very much appreciated!

Best regards, Santiago

Hi!
 
I'm trying to insert records inside a custom object using office toolkit 3 from excel vba. Now, when I try to modify the field MyObject(0)("RecordTypeId") = newId, execution stops and I get this error message from vba:
 
Run-time error '-2147467259 (80004005)':
Invalid field index::recordtypeid
 
Then I added a watch on MyObject to see its list of fields, everything OK but RecordTypeId wasn't on the list...
 
I checked in the Salesforce interface to check if this field was actually created inside the object: it was!... it's a standard field inside my custom object.
 
I read the docs, and here is what they (api7 as well as office3) say about the RecordTypeId field:
 
"RecordTypeId Fields

Record types are used to offer different business processes and subsets of picklist values to different Users based on their Profile settings.

Record types are configured in the Salesforce user interface. The RecordType object is read-only in the API. A client application can retrieve the list of valid record type IDs (String) for a given object by calling Query on the RecordType object.

The RecordTypeId field can contain the ID of the RecordType that is associated with a standard or custom object. Client applications can set this field in Create or Update calls. If specified in a Create or Update call, the record type ID (String) must refer to a valid record type for that object.

:: Note

The RecordTypeId field is available only if at least one record type is configured for your organization in the Salesforce user interface.

For more information about ID fields, see ID Fields".

It actually states that it is possible to set this field in Create or Update calls using the API...

Now, why is it then that there is no RecordTypeId field accesible for me? What am I doing wrong? Am I using the wrong api (API 6.0, I suppose).  What is the meaning of the Note above: how can I configure at least one record type for my organization in the Salesforce user interface?????

Help very much appreciated!

Best regards, Santiago