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
DausuulDausuul 

DescribeGlobal Yields Out-of-Date Metadata

I'm trying to build a system that will use the API to generate a SQL database from my company's Salesforce data.  We're a fast-growing company and we make frequent changes to our Salesforce structure, so I want my system to automatically detect when new fields and objects have been added, or old ones deleted, and modify the SQL database accordingly.

My problem is that when I use describeGlobal() to get a list of object types, the list is completely outdated!  Similarly, when I use describeSObjects() to get a list of fields for each object, the fields are not up-to-date.  I am seeing custom objects and fields that we deleted months ago, and the custom objects and fields that we've added in the last few weeks are not showing up.  I have tried calling these functions in both the Enterprise WSDL and the Partner WSDL; both yield the same result.

We have an Enterprise account, and I am using C# to run the Salesforce API.

Does anyone have any idea how to fix this or work around it?
SteveBowerSteveBower

FWIW, I've never seen those API calls return anything other than the current, correct, information.

And, just to plug someone else's tool, you might look at www.forceamp.com, which can be helpful with full schema replication if you're in a SQL Server environment.

Luck, Steve.

DausuulDausuul
D'oh... never mind.  It really helps when you set your app to log in to your main account instead of your outdated test account.  Don't I feel dumb now.