3

UPDATE [15 Jul'15] : Salesforce support confirmed that this is indeed a bug and their Research & Development team is working on this case and the matter is under our observation. Here is the Known Issue record for this Bug : https://success.salesforce.com/issues_view?id=a1p300000008ZDq

When I try to query ValidationRule via REST (Tooling) API it's returning weird error:

Query used:

/services/data/v30.0/tooling/query/?q=Select+Id%2C+FullName%2C+Metadata%2C+LastModifiedDate+FROM+ValidationRule+order+by+LastModifiedDate+desc

Error:

UNKNOWN_EXCEPTION : An unexpected error occurred. Please include this ErrorId if you contact support: 1901783396-177948 (-6049864)

On debugging further I found that ValidationRule queried via REST (Tooling) API returns DELETED objects Validation Rules too (which in turn are deleted, obviously). And as it contains Deleted Validation Rule so the REST response returns error. Seems Salesforce Issue.

If I update my query (ie query Id ValidationName and TableEnumOrId) to following, no error is returned. Then I manually checked each validation rule and found out that one of VR (is deleted one) is of deleted object, hence the error.

/services/data/v30.0/tooling/query/?q=Select+Id,ValidationName,TableEnumOrId +FROM+ValidationRule+order+by+LastModifiedDate+desc

Seems the error only comes if I include Metadata column as part of query else it doesn't throw error.

Salesforce should update VR REST API to return VR of NON DELETED objects. Is that the solution? or Am I missing something ?

  • I think you've done a really good job of isolating the issue. If there is a deleted ValidationRule then querying the Metadata field gives an internal Salesforce error. Unfortunately there doesn't appear to be a IsDeleted field exposed where you could easily exclude the deleted records. Hopefully Salesforce will pick this up. You may also want to raise the details in the developer forums (make sure you include the GACK reference). – Daniel Ballinger Apr 8 '15 at 20:32
  • I've pointed the Tooling API team at this; I'll likely file a bug internally too. – metadaddy Apr 9 '15 at 0:08
  • 1
    DanielBallinger-Thank you! Yes had to keep trying few things and manually check each VR to come to this conclusion :) Effort paid off as found core issue. I've already raised support case (to raise known issue) case no: 11845034. But they sent standard reply that support is available for premium customers only :( Not sure how one can raise "Salesforce Known Issue" @metadaddy - thank you. Keep me posted too. – Chirag Mehta Apr 9 '15 at 10:56
  • @DanielBallinger got another GACK error - UNKNOWN_EXCEPTION : An unexpected error occurred. Please include this ErrorId if you contact support: 1747685669-33873 (973480568). Doesn't seem to above issue, seems another issue. – Chirag Mehta May 14 '15 at 14:18
  • @ChiragMehta Have a look at What is a GACK? for how to handle a GACK error. If you do raise another question here about it be sure to include the reference number. However, internal errors like that can be hard for anyone outside of Salesforce to help with. – Daniel Ballinger May 15 '15 at 3:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.