• satishkr
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Duplicate of
http://salesforce.stackexchange.com/questions/156511/standardvaluesettranslation-retrieval-yields-an-unknown-exception

I get the following exception when I try to use the package.xml provided below to download my StandardValueSetTranslations.

UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1793346980-32505 (2087119523)
Package

<?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>*</members> <name>StandardValueSetTranslation</name> </types> <version>39.0</version> </Package>

I get a similar error when I try to perform a listMetadata() call with a query of type StandardValueSetTranslation:

Error
UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1260064296-52856 (-419197380)
I tried both API 38 and 39 in the package and in the listMetadata() call. I tried with the salesforce_ant_38.0.zip and salesforce_ant_39.0.zip API jars.

All other objects I try to retrieve seem to work fine. The same package.xml for instance, changing StandardValueSetTranslation to StandardValueSet works for me with no error.

Hi there,

 

I have a Batch Apex class that I am trying to test, and for some reason, the test is successful in the Sandbox - when I run it from the IDE, but unsuccessful during deployment.

 

Code is below - any clues would be highly appreciated!

 

 

global class OpenProjectsCount implements Database.Batchable<sObject>{
	
	String query;
	
	global OpenProjectsCount(){
		query = 'SELECT id, Open_Projects__c FROM Contact';
	}
	
	global Database.QueryLocator start(Database.BatchableContext BC){
	
	   return Database.getQueryLocator(query);
	}
	
	global void execute(Database.BatchableContext BC, List<Contact> scope){
		for(Contact c:scope){
			c.Open_Projects__c = [select Count() from Opportunity where Related_Contact__c =: c.id and StageName!='Lost' and StageName!='Finished' and StageName!='Cancelled'];
		}
		update scope; 
	}
	
	global void finish(Database.BatchableContext BC){

	}

}

 

 

and the test class is:

 

 

@isTest
private class TestOpenProjects {

    static testMethod void myUnitTest() {
        Contact c = new Contact(LastName='TestContact');
        insert c;
        
        List <Opportunity> opp = new List<Opportunity>();
        
        for(integer i=0; i<200; i++){
        	Opportunity o = new Opportunity(Name='Test Project'+i, Related_Contact__c=c.id, StageName='Discussions', CloseDate=date.today());
        	opp.add(o);
        }
        insert opp;
        
        Test.StartTest();
        OpenProjectsCount ops = new OpenProjectsCount();
        ID batchprocessid = Database.executebatch(ops);
        Test.StopTest();
        
        List<Contact> con = [SELECT Open_Projects__c FROM Contact WHERE id=:c.id];
        System.assertEquals(con[0].Open_Project__c, 200);
    }
}

 

 

Of course, if I remove the System Assert, at least I dont fail the test, and I am able to deploy the class, but this is still an area of concern to me. Any pointers would be extremely helpful!

 

thanks,

Pranav

 

  • September 14, 2010
  • Like
  • 0