• camforce
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi Guys,

 

I've been having trouble with loading a preset cookie (set from a login page) using the action attribute of a page called 'Home'. I've tested my login page thoroughly an there doesn't seem to be any problems with creating the cookie or clearing it. It redirects to the page Home which I then have test to see if there is a valid cookie active by running a method on the action attribute of the page. As far as I can gather, the page always initially loads a previous state of the cookie (as if it is being cached). When I first login, the cookie (outputted in a string variable) appears blank. But if I refresh the page, suddenly the cookie's contents are there.Then if I log out (clearing the cookie) and login as another user, the previous user's cookie details appear. And again if I refresh the page the current user's cookie details appear.

 

I should point out that this behaviour only occurs within a Salesforce Site. Everything was fine when testing the pages standalone, the cookie loads first time without any problems.

 

Any insight into this issue would be greatly appreciated.

 

Kind Regards,

 

Paul

 

Hi Guys,

 

I have a datalist which lists records based on certain criteria and with each record I include a button too. I have the button coded to show or hide an OutputPanel relative to it's row in the datalist. The problem is that I can't seem to get the button to perform the task for a single item in the datalist. It will only show or hide every OutputPanel in the list.

 

I've tried playing with the var attribute but haven't found anything that works.

 

Hope you can help.

 

Regards,

 

Paul

 

 

I feel I must be missing something here and please correct me if I am.

 

I am trying to deploy a custom apex trigger to Production using Eclipse. It has 100% coverage as well as it's test method which is in a seperate class. But when I go to deploy, Eclipse tells me that the average test coverage of all classes/triggers is only 72%. This seems to be due to a lot of Chatter related classes and triggers that are listed with between 30% and 90% coverage and this is stopping my deployment from going through.

 

This is my first attempt at APEX and I really don't feel I would be capable of writing test methods to get Chatter related test coverage up.

 

Is it at all possible to disregard these extra Chatter classes from being accounted for when I am trying to deploy? I don't even understand why they are there in the first place?

 

 

Somewhat related to a post I made yesterday in another thread:

 

 

http://community.salesforce.com/t5/Apex-Code-Development/URGENT-Test-coverage-of-selected-Apex-Trigger-is-0-at-least-1/td-p/203900

 

 

Any help on this would be much appreciated.

 

Cheers.

Hi Guys,

 

I've been having trouble with loading a preset cookie (set from a login page) using the action attribute of a page called 'Home'. I've tested my login page thoroughly an there doesn't seem to be any problems with creating the cookie or clearing it. It redirects to the page Home which I then have test to see if there is a valid cookie active by running a method on the action attribute of the page. As far as I can gather, the page always initially loads a previous state of the cookie (as if it is being cached). When I first login, the cookie (outputted in a string variable) appears blank. But if I refresh the page, suddenly the cookie's contents are there.Then if I log out (clearing the cookie) and login as another user, the previous user's cookie details appear. And again if I refresh the page the current user's cookie details appear.

 

I should point out that this behaviour only occurs within a Salesforce Site. Everything was fine when testing the pages standalone, the cookie loads first time without any problems.

 

Any insight into this issue would be greatly appreciated.

 

Kind Regards,

 

Paul

 

Hi Guys,

 

I have a datalist which lists records based on certain criteria and with each record I include a button too. I have the button coded to show or hide an OutputPanel relative to it's row in the datalist. The problem is that I can't seem to get the button to perform the task for a single item in the datalist. It will only show or hide every OutputPanel in the list.

 

I've tried playing with the var attribute but haven't found anything that works.

 

Hope you can help.

 

Regards,

 

Paul

 

 

I feel I must be missing something here and please correct me if I am.

 

I am trying to deploy a custom apex trigger to Production using Eclipse. It has 100% coverage as well as it's test method which is in a seperate class. But when I go to deploy, Eclipse tells me that the average test coverage of all classes/triggers is only 72%. This seems to be due to a lot of Chatter related classes and triggers that are listed with between 30% and 90% coverage and this is stopping my deployment from going through.

 

This is my first attempt at APEX and I really don't feel I would be capable of writing test methods to get Chatter related test coverage up.

 

Is it at all possible to disregard these extra Chatter classes from being accounted for when I am trying to deploy? I don't even understand why they are there in the first place?

 

 

Somewhat related to a post I made yesterday in another thread:

 

 

http://community.salesforce.com/t5/Apex-Code-Development/URGENT-Test-coverage-of-selected-Apex-Trigger-is-0-at-least-1/td-p/203900

 

 

Any help on this would be much appreciated.

 

Cheers.

Hi Sir,

 

I have created an apex test class the covers four trigger named: (1) updaterequestowner (2) change_opps (3) initialstage (4) previousstage . After doing Run All Test i have the following code coverage for the following trigger. Although all of them are more than 1%.

 

Trigger Name                           Coverage %

UpdateResourceReqDates  75

DefaultTitle                               50

updaterequestowner             100

AccountDuplicateTrigger       80

ContactDuplicateTrigger      100

change_opps                          66

initialstage                              100

previousstage                         75

 

 

 

 

But when i try deploying them in production an error appears for each of the trigger. However in sandbox it shows more than 1%.

 

 

previousstage   Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required
updaterequestowner   Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required
initialstage   Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

 

Here, is the test class:

 

@isTest

private class TriggerTests {
            
    public static testmethod void testTrigger() {
       Pre_Sales_Request__c psrc=new Pre_Sales_Request__c( name = 'a' );
       insert psrc;
       psrc.name = 'b';
       update psrc;  

    }
}

 

 

am i missing something else?? please help...its very urgent...

  • September 09, 2010
  • Like
  • 0

Hi,

 

I have some very simple trigger in sandbox. Something like to update a particular field value to another value for custom objects.

 

Now, i want to deploy my custom object to production.. but it is giving me an error saying that "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required"

 

I am not able to understand why is it coming up??Since my trigger is working fine in sandbox.

 

what to do in that case?? please help.

 

If i need to write an some apex class and all.. then i am not totally aware of how to go about and it and where and what has to be written in that class. Please see the following trigger:

 

trigger updaterequestowner on Pre_Sales_Request__c (before insert)
{
        Profile auth_profile = [select id from profile where name='HS_StandardUser_Presales'];         
        Id v_User = UserInfo.GetProfileId();   
    for(Pre_Sales_Request__c ob : Trigger.new)
        {   
            if(v_User !=  auth_profile.Id)      
                {   
                   ob.Request_Owner__c =  Userinfo.getUserId();  
                }  
        }                
}

can somebody please help in this....

  • September 08, 2010
  • Like
  • 0