Satty
Satty

Reputation: 65

Is there any easy method available to know whether there is a change in schema in Salesforce by using API?

There is a getUpdated() method available with partner API to get the list of updated records for each object in Salesforce, But is there a way to do the same thing with Schema?

http://boards.developerforce.com/t5/Apex-Code-Development/How-to-I-get-the-last-modified-date-of-a-custom-object-or-field/td-p/237501/highlight/false

The above link exactly explains my problem :( no solution though!

Upvotes: 2

Views: 214

Answers (1)

eyescream
eyescream

Reputation: 19612

Interesting question!

  1. Write some script over the ANT-based "Migration Tool" that would periodically download whole metadata, commit changes to SVN? Read about "retrieveCode" operation (not the best name in the world. But since it accepts package.xml as config source I believe you can rely on it to retrieve objects too).
  2. Automate access to https://instance.salesforce.com/setup/build/webservices.apexp. Especially the Enterprise WSDL ( https://instance.salesforce.com/soap/wsdl.jsp?type=* ) should be good for data model changes. And again - you'd need something to detect differences between the files.
  3. Really weird idea - can you try to automate screen-scraping of the Setup Audit Trail page? Or manually download the csv, then feed it to small processing program (even excel sheet should do). This one will actually list the changes for you but the format isn't best suited to parse out what was changed...

Safe harbor blah blah blah

Let's hope the upcoming Tooling API will deal with it better. There are gossips on releasing improved API, rewriting the Eclipse "Force.com IDE" plugin and releasing it to the community...

Upvotes: 1

Related Questions