• Admin Admin 31
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies
We are trying to deploy to production environment and it always says that we have a low coverage of code,regardless of anything we try to deploy.

We tried different types of change sets:
1. A change sets with our changes. It didn´t work.
2. A change set with test classes in order to increase coverage. It didn´t work.
3. A change set with a class, changing ONLY Strings and nothing else(accents in some words). It didn´t work.

Before deploying, the code coverage is 80%. The error while deploying says that the code coverage is 73-74% which means that by changing a few Strings in a class, we decrease our coverage by 6%??? It doesn´t make sense.
We are trying to automate some of the tasks we perform in our salesforce community and we are wondering  whether or not we can create sharing rules from our apex. Can we? by "sharing rule" I mean the actual creation of the rule, instead of just sharing records...
Currently, the creation of the sharing rules is a manual task the admin has to perform on salesforce.
What should be printed for this piece of code?

Date f1 = date.newinstance(2014,19,13);   // yyyy, MM, dd for my timezone...meaning the month is invalid
system.debug(f1);

It is printing:  2015-07-13 00:00:00  
..meaning it is adding the extra months to the date!!!! it should throw an exception as any language would do!!!
OR...the behavior should be documented in the dev docs.
 
Hi,
I´m trying to deploy using the ant tool and I´m getting the error stated in the title for every class in the environment.
I tried to solve the issue by compiling all the classes and deleting all the jobs. Currently, all the jobs are in the "DELETED" state, but one, which is in the "ACQUIRED" state.
Any clues what this issue is about? what is this ACQUIRED state? i couldn´t abort the job.....
Thanks in advance.
We are trying to deploy to production environment and it always says that we have a low coverage of code,regardless of anything we try to deploy.

We tried different types of change sets:
1. A change sets with our changes. It didn´t work.
2. A change set with test classes in order to increase coverage. It didn´t work.
3. A change set with a class, changing ONLY Strings and nothing else(accents in some words). It didn´t work.

Before deploying, the code coverage is 80%. The error while deploying says that the code coverage is 73-74% which means that by changing a few Strings in a class, we decrease our coverage by 6%??? It doesn´t make sense.
Hi,
I´m trying to deploy using the ant tool and I´m getting the error stated in the title for every class in the environment.
I tried to solve the issue by compiling all the classes and deleting all the jobs. Currently, all the jobs are in the "DELETED" state, but one, which is in the "ACQUIRED" state.
Any clues what this issue is about? what is this ACQUIRED state? i couldn´t abort the job.....
Thanks in advance.
I'm writing a trigger that will:

Every time a new contact is created, of Record Type 'Consumer', I want to create a corresponding record in the master-detail custom object Compliance2__c.  The only field that needs to be passed is the lookup value.  The other fields on Compiance2__c are formulas.  
The error I'm getting is: "Error: Compile Error: unexpected token: 'for' at line 5 column 4"

My code is:
trigger createCompliance on Contact (after insert) {
    
    List <Compliance2__c> compToInsert = new List <Compliance2__c>
    
    for (Contact c : Trigger.new) {
        
        //check if this is a Consumer being created
        if (c.RecordType.Name = 'Consumer') {
            //create a new Compliance for each new Consumer
            Compliance2__c i = new Compliance2__c ();
            i.Consumer__c = c.Id;
            //add to the list of Compliances to insert
            compToInsert.add(i);
        } //end if
    } //end for c
    //after loop, insert new Compliances
    insert complianceToInsert;  
}

Any help is appreciated.
Thank you!