CategorySalesforce.com

APEX Sharing Violation – Security Review Error Solved

A

In the process of making a salesforce app live on appexchange, we need to get our package tested and passed from security review team. During such one process, my app got rejected due to APEX Sharing Violation error as reported by Checkmarx Report. It was termed as Apex Force com Serious Security Risk. Description of Issue: The Force.com platform makes extensive use of data sharing rules. Each...

How to get parameters passed to a URL in salesforce apex

H

If we pass parameter while creating a page in salesforce apex like this public PageReference setParameter() { public papageReference ref = new PageReference(‘/apex/print?email=’ + textEmail1);    ref.setRedirect(true); return ref; } where email is the parameter. Then using the following function we can get the value of the parameter passed public getParameter() { email = ApexPages...

Salesforce form integration (web-to-lead) with PHP and cURL

S

In the example below I am only showing the basic process. I am leaving out the validation code for the fields and any submission code to MySQL database. One security advantage of this process is hiding your organisation id within a variable in the submission page rather than on the live page with the form. // SF Org Id. $oid = "0113543434646"; I first check if cURL is enabled before processing...

Maximum number of custom fields allowed for Developer’s edition of Salesforce.com

M

I was creating custom fields for a particular site and just got notification that the maximum number of custom fields reached. Please contact your administrator. The maximum number of custom fields allowed for developer’s edition are 500 fields/per object. Similarly for professional edition it is 100 fields/object.Additional restrictions apply for activities, long text area fields...

Using Schema.getGlobalDescribe() to get list of all fields in Salesforce Apex

U

I had one dropdown that had options – Lead, Account, Contact, Opportunities and some custom objects. Upon selection of any of this object, all the respective object’s standard and custom fields should be populated in another dropdown. This is how I achieved it: Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get(‘Account’).getDescribe()...

Category