• lei.zhang@zuora.com
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hi,

    I find a very wired question about code coverage. See the attached pic. Why the close braces not covered? The same question to the TestMethod?  It's not the browser problem, I have tried in different browsers, the results are the same.

    Can anyone help me? Thank you very much!

 



    The question is about Trialforce, I build a Managed Package, if:

  • I pass the security review for the App Version 4.3(for example) last year.     
  • Then upgrade the app to Version 5.0 this year.    
  • I still not pass the security review for V5.0.     
  • Now I can apply a TMO for this app for I have pass the security review for a former version. 
   Whether can we install V5.0 on the TMO and will it works well?
   Another question, If I build a Managed Package and have passed the security review of salesforce, I can apply for a new TMO, yes?
Thanks!

Which company have used this feature yet? Can anyone send a link?

Thanks!

There is a standard Object in salesforce: Profile. It has some permission methods, where I can find the description of the methods.

 

eg.

    String profileId = UserInfo.getProfileId();

    Profile curProfile = [select Id, Name from Profile Where Id =: profileId limit 1];

    curProfile.PermissionsEditReadonlyFields("maybe have parameters");

    curProfile.PermissionsManageCategories("maybe have parameters");

    curProfile........

 

    I want to find the description of PermissionsEditReadonlyFields, PermissionsManageCategories and so on.

 

Thanks.

----

Lei

        Hi,I'd like to get the version number of a managed package, which installed in a salesforce org, from a Java application through Apex Web Service API, is there any workaround?


        In more detail:
        1. Create a managed package.
        2. Use the Install URL to install this managed package to another dev org.
        3. Get the version number of the managed package, which installed in the dev org, from a Java application through Apex Web Service API.

        I find in the force.com's schema, there is an object apexPackage, but the version number is the APIVersion of the salesforce, eg:19, 21...   but not the package's version number, like 1.2.4, 1.4.2 and so on.

        I also have sent a email to the salesforce support, this is the response, but not what i want:

        /*********************************
            I understand that you want to get the version number of a managed package installed in salesforce. I have located the following possible solution that may be able to guide you.

           Click Your Name | Setup | Create | Packages and click the name of a package to view its details, including any added components, whether it is a managed package, if the package has been uploaded, and so on.
The detail page has the following sections:

           * Package details
           * Package components
           * Remote access
           * Development organizations
           * Version history
       **********************************/

       Thanks for any respone!

Hi,

    I find a very wired question about code coverage. See the attached pic. Why the close braces not covered? The same question to the TestMethod?  It's not the browser problem, I have tried in different browsers, the results are the same.

    Can anyone help me? Thank you very much!

 



    The question is about Trialforce, I build a Managed Package, if:

  • I pass the security review for the App Version 4.3(for example) last year.     
  • Then upgrade the app to Version 5.0 this year.    
  • I still not pass the security review for V5.0.     
  • Now I can apply a TMO for this app for I have pass the security review for a former version. 
   Whether can we install V5.0 on the TMO and will it works well?
   Another question, If I build a Managed Package and have passed the security review of salesforce, I can apply for a new TMO, yes?
Thanks!

Hi,

 

I am using one object called Holiday__c. It has two fields Name and Date.

 

The following code represents the code for deleting Holiday record.

 

public class DeleteHoliday 
{
    /* Global Variables */
    private final Holiday__c objHoliday;
    /* End of Global Variables */
    
    /* Standard Controller Constructor */
    public DeleteHoliday(ApexPages.StandardController con) 
    {
        this.objHoliday=(Holiday__c)con.getrecord();
    }
    /* End of Standard Controller Constructor */
    
    /* Method called on to Delete Holiday */
     public PageReference checkDelete()
     {
        try
        {
        Database.delete(objHoliday);        
        }
        catch(System.DMLException e)
        {
        return null;
        }
        PageReference p =  
new Pagereference('/apex/AdminListView?intFocus=4’);
        p.setRedirect(true);
        return p;
     }
}

 The following code represents the Test Coverage code:

/* Test Coverage */

            static testMethod void deleteHolidayPositiveTest()
         {
             Holiday__c testH=new Holiday__c(Name='Test HL1',date__c=System.Today());
             

                 insert testH;

 ApexPages.StandardController con=new ApexPages.StandardController(testH);
        
        /* Instantiate the extention instance with the standardcontroller */
        DeleteHoliday ext=new DeleteHoliday(con);
        
        /* Invoke the delete method on the extension */
        ApexPages.PageReference result=ext.CheckDelete();
}
/* End Test Coverage */

 

By using the above test code i am getting 81% test coverage. I am looking for 100% test coverage. What changes are required to gain 100% test coverage?

 

Thanks and Regards,

Devendra S

 

There is a standard Object in salesforce: Profile. It has some permission methods, where I can find the description of the methods.

 

eg.

    String profileId = UserInfo.getProfileId();

    Profile curProfile = [select Id, Name from Profile Where Id =: profileId limit 1];

    curProfile.PermissionsEditReadonlyFields("maybe have parameters");

    curProfile.PermissionsManageCategories("maybe have parameters");

    curProfile........

 

    I want to find the description of PermissionsEditReadonlyFields, PermissionsManageCategories and so on.

 

Thanks.

----

Lei