• sobroach
  • NEWBIE
  • 60 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 16
    Replies

I'm attempting execute a trigger on case via a utility class, after update, and getting the "Internal Salesforce.com Error" 

 

11:21:10.529 (1529716000)|FATAL_ERROR|Internal Salesforce.com Error

 

I get Success on before update, but the update doesn't happen.  I've debugged down to this last piece and don't see any issues in my queries, no select statements in for loops, etc.  

 

I see recent posts re: this error as being a SF.com internal issue, does anyone know?  

 

 

4 mos ago: 

 

"Despite what the error message says and what product management’s comments here indicate,  filing a case with support is generally not encouraged or supported.   

Support will close your ticket and either tell you to post this on the idea exchange or state that this requires developer support to be worked.  Sales has confirmed this is the case for any internal server errors that come from either apex or visual force code.
 
It is sad that salesforce (support and sales anyway) wants you to purchase developer support to give them an example of a bug in their code."  https://success.salesforce.com/ideaView?id=08730000000JKDp

HI, 

 

I'm trying to iterate through all sobject (opportunity) fields and see which ones changed against my trigger map.  

 

Currently 's' is an incompatible key type Schema.SObjectField for MAP<Id, Opportunity>. Any help?

 

fyi Map<Id, Opportunity> newMap = Trigger.newMap()


for(Opportunity o: newMap.values()) { for(Schema.Sobjectfield s: SObject.describe('Opportunity')) { if(newMap.get(o.Id).s != oldMap.get(o.Id).s) { //do stuff in a different class } } }

 

Have already been referencing http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_describe_objects_understanding.htm

http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_methods_system_fields_describe.htm|StartTopic=Content%2Fapex_methods_system_fields_describe.htm|SkinName=webhelp

http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf

Trying to deserialize a list of programming objects to an @future method and I'm getting this error: 

Method does not exist or incorrect signature: JSON.deserialize(LIST<String>, Type) 

 

@Future(callout=true)

    public static void send(List <String> mgs){

    List<ProgrammingObject> messages = (List<ProgrammingObject>)JSON.deserialize(msgs, List<ProgrammingObject>.class);

 

Any help?

I have a field that is a formula field that is a concatenation of two other fields.

 

The Custom field is on the Standard Contract Object "Contract.SourceContractID__c" and it's a formula field which concatenates of "Account.Field__c" & "Contract.Number__c" 

 

So if Account.Field__c = 12345

and Contract.Number__c = 00001

 

then, SourceContractID__c = 1234500001.

 

The problem is this:  This SourceContractID__c field is a link to another system.

 

If Account.Field__c CHANGES, then the Formula changes the Contract.SourceContractID__c field to concatentate the new value entered into the Account.Field__c plus the Contract.Number__c (which is a system generated number and cannot be changed.

 

So if Account.Field__c WAS 12345, but changes to 99999

and Contract.Number__c REMAINS 00001

then, Contract.SourceContractID__c CHANGES to 9999900001.

 

This throws off the integration to the other system, because the ID it's looking for has now changed!!!, and screws everything up.  

 

There is a business need to be able to change Account.Field__c, so I can't lock that field down.

 

QUESTION:

Is there a way via a Validation Rule for me to LOCK Contract.SourceContractID__c after it has been initially filled in (even though it is a formula field), so that it cannot be changed if Account.Field__c changes?

 

Thanks in advance for any and all help!

 

Here is the formula field on the Contract Object:

Contract.SourceContractID__c: 

 Account.Field__c & Number__c

 

 

  • August 12, 2013
  • Like
  • 0

I want to pass along the date, as well as the status to the Asset Object from the Contract Object - when I set the Contract Object's end date.

 

The code I have is passing along the status (so when I END the Contract, it sets the Asset's Status to 'Inactive'), but it is not passing along the date.

 

So the problem is, that the Assets are having a different end date from the Contract.

 

Can anyone help?

 

trigger ContractStatusUpdatesAsset on Contract(before insert,before update){

    List<Id> conIds = new List<Id>();
    List<Asset> newAssetlist =  new List<Asset>();
    
    for(Contract cnt:Trigger.new)
    {
    if(cnt.Status=='Expired')
        {
        conIds.add(cnt.Id);
        }
    }

    List<Asset> childAssets = [Select Contract__c, Status FROM Asset WHERE Contract__c IN:conIds];
    
    for(Asset a : childAssets)
    {
        a.Status='Inactive';
        newAssetlist.add(a);
    }
    
    
    if(childAssets.size() > 0)
            
    {
    //System.debug('Chris has values to insert = '+ newAssetList.size());
    try
         {
            update newAssetlist;
         }
             catch (System.Dmlexception e)  
         {
         system.debug (e); 
         }
    }    
    
    
}

 

  • May 09, 2013
  • Like
  • 0

I'm attempting execute a trigger on case via a utility class, after update, and getting the "Internal Salesforce.com Error" 

 

11:21:10.529 (1529716000)|FATAL_ERROR|Internal Salesforce.com Error

 

I get Success on before update, but the update doesn't happen.  I've debugged down to this last piece and don't see any issues in my queries, no select statements in for loops, etc.  

 

I see recent posts re: this error as being a SF.com internal issue, does anyone know?  

 

 

4 mos ago: 

 

"Despite what the error message says and what product management’s comments here indicate,  filing a case with support is generally not encouraged or supported.   

Support will close your ticket and either tell you to post this on the idea exchange or state that this requires developer support to be worked.  Sales has confirmed this is the case for any internal server errors that come from either apex or visual force code.
 
It is sad that salesforce (support and sales anyway) wants you to purchase developer support to give them an example of a bug in their code."  https://success.salesforce.com/ideaView?id=08730000000JKDp

HI, 

 

I'm trying to iterate through all sobject (opportunity) fields and see which ones changed against my trigger map.  

 

Currently 's' is an incompatible key type Schema.SObjectField for MAP<Id, Opportunity>. Any help?

 

fyi Map<Id, Opportunity> newMap = Trigger.newMap()


for(Opportunity o: newMap.values()) { for(Schema.Sobjectfield s: SObject.describe('Opportunity')) { if(newMap.get(o.Id).s != oldMap.get(o.Id).s) { //do stuff in a different class } } }

 

Have already been referencing http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_describe_objects_understanding.htm

http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_methods_system_fields_describe.htm|StartTopic=Content%2Fapex_methods_system_fields_describe.htm|SkinName=webhelp

http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf

Trying to deserialize a list of programming objects to an @future method and I'm getting this error: 

Method does not exist or incorrect signature: JSON.deserialize(LIST<String>, Type) 

 

@Future(callout=true)

    public static void send(List <String> mgs){

    List<ProgrammingObject> messages = (List<ProgrammingObject>)JSON.deserialize(msgs, List<ProgrammingObject>.class);

 

Any help?

I need to update a custom Date/Time field on thelLookupRecord any time I create or update a relatedRecord.

 

How can I build a trigger to do this?

 

 

 

  • February 26, 2013
  • Like
  • 0

I am trying to get this trigger to fire a new record on the custom object SVOC__c every time the field Account.SVOC__c is filled in OR changed with a number/text.  or goes from nothing to something. Also, this field should always be unique (it already is set to "do not allow duplicate values"  -->  but i need to know if someone is trying to create the same number/text combination.

 

It compiles fine, and it runs, but is not creating the new record.

 

In debugging the trigger is not going through past the second debug method.

 

Any help would be greatly appreciated.

 

Thanks,

Chris 

 

trigger AccountSVOC on Account (after update) 
{
    List <SVOC__c> SVOCs = new List <SVOC__c> ();
    Map <Id, Account> oldmap = new Map <Id, Account>();
    Map <Id, Account> newmap = new Map <Id, Account>();

System.debug('Chris in trigger');

    for(Account a: Trigger.new) 
    {
System.debug('Chris in account loop');
     if ((Trigger.oldMap.get(a.Id).SVOC__c != Trigger.newMap.get(a.Id).SVOC__c) && Trigger.newMap.get(a.Id).SVOC__c != null )
        { 
System.debug('Chris in status changed');
        SVOC__c SVOC = new SVOC__c ();
        SVOC.SVOC_ID__c = a.Id;

System.debug('Chris creating new SVOC and adding to list');
        SVOCs.add(SVOC);
        }
    }

    if(SVOCs.size()>0)
    {
System.debug('Chris has values to insert = '+ SVOCs.size());
     try{
        insert SVOCs;
        }catch (System.Dmlexception e)  
             {
             system.debug (e); 
             }
    }

}

  • February 22, 2013
  • Like
  • 0

There is an "idea" to disable jobs, but is there a way to mass delete them all using Apex?   Would like to delete the following:

 

Dashboard Refresh

Data Export

Scheduled Apex

Report Run

 

 

 

https://sites.secure.force.com/success/ideaView?id=08730000000HBnU

I'm deploying a series of Apex classes using the Force.com Migration Tool (i.e. ANT). However, when I specify an explicit test class I get all errors for classes that already exist (the target instance is a sandbox), and have no bearing on the Apex classes I'm deploying. In short, it seems to be running all tests.
 
The classes I'm deploying aren't packaged, and neither are the existing classes which produce the errors.
 
Here's is my ANT task:
 
Code:
    <target name="deployWebSvcPkg">
      <sf:deploy username="${dest.username}" password="${dest.password}" serverurl="${dest.serverurl}" deployRoot="webSvcPkg">
        <runTest>WebSvcTest</runTest>
      </sf:deploy>
    </target>

 
Any ideas as to why these other (existing) classes end up being tested run I run the above task?