Developer Questions & Answers

We have custom profiles. We create custom fields and/or custom objects. As we create these things we set security, field accessibility, etc. Now sometime later we create new profiles. What does Salesforce do when it comes to field security or accessibility on those new profiles?

Ans: We are required to select an existing profile while creating a new one. Here are the impacts on field accessibility and security on new profile:

a) Create a brand new profile : This will inherit only standard security and field accessibility associated to existing profile.
b) Cloning an existing profile : This will inherit all security and field accessibility to cloned profile.

Do you use Eclipse? If so, can you recommend places to go on the net to learn about Eclipse?
Ans: Yes we use Eclipse for Development, Testing, Packaging and Deployment. Force.com IDE/Eclipse is an efficient tool for developers to write and debug the code at one place.

For more information: https://developer.salesforce.com/docs/atlas.en-us.eclipse.meta/eclipse/ide_getting_started.htm

At some point can you talk about change sets and how you make sure that everything you have changed gets included in the change set.

Ans: We create and add all the required components into Change Set for deployment. If we change any component after adding all comps into change set, the changes will be included only if it is not uploaded into the target org. In other words, we don’t need to add the changed components again and again till the time change set is not uploaded into target org.

For more information: https://trailhead.salesforce.com/en/app_deployment/app_deployment_changesets?id=app_deployment

Do you know of a tool that helps find differences between production and sandbox?

Ans: As of now, there is no internal tool provided by Salesforce to find difference between production and sandbox. However, there is an app called “SnapShot Change And Release Management” available on appexchange.

Link to app:
https://appexchange.salesforce.com/listingDetail?listingId=a0N300000016YhyEAE

Do you know of a tool that shows fields in objects and then next to the field name shows the field security’s/accessibility for a number of profiles at the same time? I know you can go to a field on an object and see all the settings for all the profiles but I want something like a bunch of rows and columns and I want to see all the fields and all the profiles at once.

Ans: We can see all the settings for a field either by navigating to specific profile or a specific field only. We don’t have any tool which can show up the settings for a profiles and field security in matrix format. (It can be achieved by implementing apex code).
Can you recommend blogs or sites with good Apex example?
Ans: Please visit our blog:
https://apexcoder.com/getting-started/#Apex%20&%20Visualforce

Do we write test classes assuming what values could go in to the code? Is this a simulation of all possible scenarios?

Ans: Yes, we must pass the values matching with real data and a simulation of all possible scenarios. It helps to achieve a good code coverage along with validated test of a functionality developed in corresponding class.

I was trying to create a sandbox to practice apex code, but i don’t see the sandbox page which doing quick search? Is it Org privilege issue? or should i use developer console instead?
To create a sandbox org:
  1. From Setup, enter Sandboxes in the Quick Find box, then select Sandboxes.
  2. Click New Sandbox.
Inline image 1

Ans: You can create a Sandbox from production instance of Salesforce only. Sandbox is a copy of production. You can’t create a sandbox from Sandbox. What you have now is a most likely a free Developer Edition, and you can’t make a Sandbox from Developer Edition.

Is it possible in SOQL to have nested aggregate functions ?
For example: [SELECT SUM( COUNT( Id ) ) FROM Case WHERE Accountid = ‘001a000001aAaaa’ GROUP BY My_Custom_Field__C]

Ans: No, you can not use nested aggregate functions.