function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HaroldHHaroldH 

Unable to "save schema" in sforce Explorer - related to custom fields?

This may not be the appropriate forum for a question regarding the "sforce Explorer" application, but since we're using its "Save Schema" function--which is extremely handy, by the way--here goes. 

On the "Data Editor" tab, if you attempt to select the Product2 object, it throws the following exception: 

"Error getting data.'dataType' argument cannot be null. Parameter name: datatype"

I only see this error on an org where the Product2 object contains custom fields.  Here's a list of the custom field types.  Could the large multipicklist fields be causing the problem?

string(10) (3 of these)
textarea(255)
picklist(255)
multipicklist(4099)  (2 of these)

If we could extract the schema some other simple way, that would be great.  sforce Explorer makes it easy to do this without writing any code.  We can get similar information via the Enterprise WSDL, but it's not as detailed as the schema xml created by sforce Explorer.

Clues, suggestions?  Thanks.

Message Edited by HaroldH on 01-05-2005 01:53 PM

HaroldHHaroldH

I fixed this problem by modifying \source\sforceExplorer\Common.cs.

I'm not sure of the correct protocol here, but to make this change to the code (for your personal use or future releases of this open source project):

Common.cs, at line 183:  

BEFORE:

                case sforce.fieldType.picklist:
                    returnValue = System.Type.GetType("System.String");
                    break;

AFTER:

                case sforce.fieldType.picklist:
                case sforce.fieldType.multipicklist:
                    returnValue = System.Type.GetType("System.String");
                    break;

 

 

DevAngelDevAngel

Thanks Harold!

I guess I'll remove my "better late then never" post above!