• pcroadkill
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 5
    Replies
I have a query against the Account object that returns all accounts for a specific business unit. If I modify the query to include the billingstate field as part of the criteria, no results are returned even though there are records that match the criteria.

We have checked the permissions on the billingstate field and is open to everyone. Any ideas on what else couldbe preventing us from being able to query using the billingstate as criteria.

Example queries:
SELECT Business_Unit__c, Name, billingstate, Id FROM Account where business_unit__c = 'Consumer'  -- works and returns accounts.

SELECT Business_Unit__c, Name, billingstate, Id FROM Account where business_unit__c = 'Consumer' and BillingState = 'IL' -- does not work and the above query has multiple records from Illinois.

Thanks in advance for any help/hints that you can provide.
I have a java program that gets data from or BI system and then either merges the data with an existing salesforce account record or creates a new one. When I submit the upsert call using the Id as the key, my expectation was that the records that contain an Id will be updated and the ones that don't, will be created. It seems that it always creates new records therefore creating duplicates.

I have read that the upsert api doc and refers to an externalId, but I have not found anything that states how to use the actual Object id as the key. In the REST api doc and DML guides say to leave the key blank and it will use the object id, but in the SOAP API I don't seem to be able to do that.

Any help will bre greatly appreciated.
I am trying to submit a Case using the java API. When I try to save it, I get the following error:

Record Type ID: this ID value isn't valid for the user: 012E000000023tjIAA

Yet when I query the RecordType with SELECT ID, isactive FROM RecordType where sobjecttype = 'Case' and developername='Complaint_Case' and isactive = true it returns me the following:

true 012E000000023tjIAA.

Stepping through the code, I made sure that the correct id is being returns and it is.

What am I missing? Any insight will be greatly appreciated.


I have a VisualForce page that is using the Ajax Toolkit to make a remote call. The remote call works fine but when I try to us it to do a query agains Saleseforce, it fails. The first time I attempted it the error indicated that it was trying to send the query to the remote URL, so I re-initialize the connection before I do the local query but it does not work.

Any sugestions?

I am trying to deploy a new trigger and can't because the test below is failing. It is failing with the following error:

 

16:04:51.566 (566509000)|EXCEPTION_THROWN|[37]|System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Qualified: []

 

Yet when I run the query specified in teh following line:

 

LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];

 

The status returned is 'Qualified' which is a valid status. Could anyone shed light on what may be going on... Thank you in advance.

 

private class TestPopulateCloseDateOnOppOnLeadConvert {

static testMethod void PopulateCloseDateOnOppOnLeadConversion() {

//Create
Lead lead = new Lead(LastName='Test', Company='Test', Business_Unit__c='EPS', CurrencyISOCode='USD', Status='Unqualified');
insert lead;

//Invoke
test.startTest();
Database.LeadConvert lc = new Database.LeadConvert();
lc.setLeadId(lead.Id);
LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];
lc.setConvertedStatus(convertStatus.MasterLabel);
Database.LeadConvertResult lcr = Database.convertLead(lc);
system.assert(lcr.isSuccess());
test.stopTest();

//Check
id oppId = lcr.getOpportunityId();
Opportunity opp = [SELECT Id, CloseDate FROM Opportunity WHERE Id = :oppId];
system.assertEquals(system.today().addDays(3), opp.CloseDate);

}
}

I am using the Web Services API to manage users. We have some existing users in Salesforce that are currently chatter free that need to be changed to a full license user.

 

I load their user object and change the role and profile but apparently I am missing something because I get the following error when I try to save:

 

FIELD_INTEGRITY_EXCEPTION -> CSN Only Users cannot have a user role: Role ID...

 

I there are guide/steps that I need to take to accomplish this. Any help would be greatly appraciated...

I have a java program that gets data from or BI system and then either merges the data with an existing salesforce account record or creates a new one. When I submit the upsert call using the Id as the key, my expectation was that the records that contain an Id will be updated and the ones that don't, will be created. It seems that it always creates new records therefore creating duplicates.

I have read that the upsert api doc and refers to an externalId, but I have not found anything that states how to use the actual Object id as the key. In the REST api doc and DML guides say to leave the key blank and it will use the object id, but in the SOAP API I don't seem to be able to do that.

Any help will bre greatly appreciated.
I am trying to submit a Case using the java API. When I try to save it, I get the following error:

Record Type ID: this ID value isn't valid for the user: 012E000000023tjIAA

Yet when I query the RecordType with SELECT ID, isactive FROM RecordType where sobjecttype = 'Case' and developername='Complaint_Case' and isactive = true it returns me the following:

true 012E000000023tjIAA.

Stepping through the code, I made sure that the correct id is being returns and it is.

What am I missing? Any insight will be greatly appreciated.


I am trying to deploy a new trigger and can't because the test below is failing. It is failing with the following error:

 

16:04:51.566 (566509000)|EXCEPTION_THROWN|[37]|System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Qualified: []

 

Yet when I run the query specified in teh following line:

 

LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];

 

The status returned is 'Qualified' which is a valid status. Could anyone shed light on what may be going on... Thank you in advance.

 

private class TestPopulateCloseDateOnOppOnLeadConvert {

static testMethod void PopulateCloseDateOnOppOnLeadConversion() {

//Create
Lead lead = new Lead(LastName='Test', Company='Test', Business_Unit__c='EPS', CurrencyISOCode='USD', Status='Unqualified');
insert lead;

//Invoke
test.startTest();
Database.LeadConvert lc = new Database.LeadConvert();
lc.setLeadId(lead.Id);
LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];
lc.setConvertedStatus(convertStatus.MasterLabel);
Database.LeadConvertResult lcr = Database.convertLead(lc);
system.assert(lcr.isSuccess());
test.stopTest();

//Check
id oppId = lcr.getOpportunityId();
Opportunity opp = [SELECT Id, CloseDate FROM Opportunity WHERE Id = :oppId];
system.assertEquals(system.today().addDays(3), opp.CloseDate);

}
}