Forum Replies Created

  • Hi Audrey,

    Use TrailHead - it's actually the best way to learn SF development and administration.

    It's preferable to know admin tools in Salesforce because sometimes you can avoid development and do a task much faster with them.

  • Nikita

    Member
    November 10, 2017 at 5:41 am in reply to: Creating Salesforce Developer Org - what does this mean?

    Hi Maria,

    Developer Org is exactly what it sounds - it's an org for development. As it's not connected to any other Salesforce org at all, you won't have any data there (except for the samples). Your developers can deploy code there and work on new features. But from my experience, most customers prefer dev sandboxes.

    To have a full data copy you have to create a Full sandbox in your production org. Go to "Setup -> Sandboxes", create a new one and choose Full there. This will create a full copy of your production as a sandbox, where you can test any scenarios related to data.

  • Nikita

    Member
    November 10, 2017 at 5:35 am in reply to: how to avoid mixed dml exception in Salesforce test class?

    Hi Uday,

    Try using "Test.startTest()" and "Test.stopTest()". These break unit test context into two contexts (inside startTest-stopTest and outside)

  • Nikita

    Member
    October 23, 2017 at 3:04 pm in reply to: Download Salesforce Visualforce page on Single Click of Button

    Hey Parv!

    You can just append ' renderAs="pdf" ' to you <apex:page> tag.

    You can find more info here: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_page.htm

  • Nikita

    Member
    October 8, 2017 at 7:57 pm in reply to: Which is the best place to learn Salesforce admin?

    Hey, Ashok.

    No surprise, the best place is Trailhead: https://trailhead.salesforce.com/en

  • Hey, Kenny.

    Why don't you just use standard 'for' loop?

     for(Integer i = 2000; i < 6000; i++) {
     System.debug('objList[i] >>> ' + objList[i]);
     }
    • This reply was modified 7 years, 1 month ago by  Nikita.
    • This reply was modified 7 years, 1 month ago by  Nikita.
    • This reply was modified 7 years, 1 month ago by  Nikita.
  • Nikita

    Member
    October 5, 2017 at 3:48 pm in reply to: How to find controller type in Salesforce?

    Hi, santosh

    The easiest solution, in my opinion, is to download all the pages from Salesforce org with some tool (Migration tool, IDE) and then use something like 'grep' to get controllers and extensions. Cons: you have to have *nix environment or bash for Windows installed to use grep. Alternatively, you can use any code editor to look through the pages.

    Algorithms to get controllers:

    Using editor

    1. Run "Find in folder" command for the pages folder
    2. Search for " controller=" to get controllers or for " extensions=" to get extensions

    Using 'grep': run in terminal

    1. To get controllers: `grep --regexp=" controller=\".*\"" src/pages/* -oih > controllers`
    2. To get extensions: `grep --regexp=" extensions=\".*\"" src/pages/* -oih > extensions`

    These will create 'controllers' and 'extensions' files where in the beginning of each line will be controllers and extensions. You can then get class names from there.

  • The system mode ignores users permissions. In system mode, Apex code has access to all objects and fields— object permissions, field-level security, sharing rules aren't applied for the current user. This is to ensure that code won’t fail to run because of hidden fields or objects for a user. For example, logged in user doesn't have a "create" permission but they are able to create a record in System mode.

    All apex code run in system mode. It ignores user's permissions. The only exception is anonymous blocks like developer console and standard controllers. Even `runAs()` method doesn't enforce user permissions or field-level permissions, it only enforces record sharing.

    "Without sharing" keyword tells Apex code to ignore sharing rules, but not users permissions.