Tag Archives: salesforce customisation

Salesforce: Pre populate form data in create screen

In Salesforce, the standard Account creation will go through the following link:

https://eu1.salesforce.com/001/e

If you understand HTML, you can prepopulate some values into the existing form. This approach is extremely useful if you would like to create a custom button that links to a prepopulated form. This is how you can achieve it:

1) View HTML source behind the scene

1
For example: acc2 represents the Account Name and acc10represents Phone.  You can prepopulate the field by using the following URL:

https://eu1.salesforce.com/001/e?acc2=WDCi&acc10=12345678

2
Note: You may have different URL such https://ap1.salesforce.com. This concept will work also for other objects.

Salesforce: Custom Object Search Behavior

Not all fields in Salesforce custom object are searchable in Salesforce. For example, you can refer to this documentation for more information.

If you have a lookup field such as Contact Lookup field, you can implement the following workaround:

1) You have a Contact lookup field in your custom object. This field will only keep track of the Contact ID.

2) Create a new text field (searchable). You don’t have to expose this field in the layout.

3) Create a workflow that copies the Contact Full Name into this Text field.

Voilà!

Salesforce as a Subscription Billing System Part 2

We talked about how Salesforce can turn into a Subscription Billing System in our previous blog post and illustrate how a standard full month subscription items can be recorded automatically.

Apart from handling the standard full month subscription, it should be capable to handle pro-rata scenario too. This is important as not every subscription starts from the first of every month and customer should be credited appropriately.

Imagine that a customer subscribes to your services/products in the middle of the month (i.e. 13th Mar 2013). The first month should really be charged from 13th until 31st Mar instead of the full month. And so the final month of the subscription that the customer too should be charged accordingly.

To find out in more details on how can the pro-rata scenario can be handled in Salesforce, feel free to check out our recently published case and contact us for more information.

Salesforce: Change Picklist to Radio Button in Web-to-Lead Form

If you have a picklist type field in Lead, and you have the following HTML for this field:

Preferred contact method:
<select id="00NN0000000AcD1" title="Preferred contact method" name="00NN0000000AcD1"> <option value="">--None--</option> <option value="Phone">Phone</option> <option value="Email">Email</option> </select>

Let’s say you want to change this field into a radio button. You can change it to:

Preferred contact method:
<input id="00NN0000000AcD1" title="Preferred contact method" type="Radio" name="00NN0000000AcD1" value="Phone" />
<label>Phone</label>
<input id="00NN0000000AcD1" title="Preferred contact method" type="Radio" name="00NN0000000AcD1" value="Email" />
<label>Email</label>

Salesforce: Customized PDF Quote with e-Signature

Salesforce has an out of the box Quote feature which include allowing users to customize the Quote form template. However, there are some restriction when customizing the Quote form appearance.

More flexibility can be achieved using our custom-made Quote form instead. Following are some of the highlights of our custom-made Quote form:

  • Customizable layout appearance (related fields, images and etc. can be displayed in any position)
  • Signature can be signed on the form electronically via computer, smart phone, tablets, and etc.
  • Quote can be saved as PDF with or without the signature

Example of signing a signature electronically during the Quote creation:

The signature inserted is then included in the PDF sample of our customized Quote:

 

Salesforce: Cross Object Page View With Extensible Filters

Salesforce object view allows records to be displayed based on the filter criteria of your choice. And the fields to be filtered are restricted to within its object as such:

There have been requirements that:

  • the filter needs be extended in the manner that it can also filter the fields for other related records
  • records can be mass updated via inline editing
  • records can be sorted

This is mostly implemented between custom objects and occasionally involves records from standard objects. As an illustration of what is required, we will use the Salesforce standard objects as an example.

For a full description, please check out our use case here.

Salesforce Data Loading Record With Automated Association To Related Records On Creation

There are many data loaders in the appexchange market place that allow users to import data into Salesforce with ease. The data import user requirement can range from as simple as loading just a batch of records to as complex as loading a batch of cascading records into Salesforce. We have also encountered a number of customers who require that:

  • data loader to be utilised for the first level of batch record creation
  • Apex trigger to associate the pre-defined related records to the master record after data loading

The above requirement provides the flexibility for the user to pre-select the records that should have automated association and manipulate the to be associated pre-defined records. We have a study case from a customer who has such preference listed here.

Salesforce: How to make a Document public?

A public Document in Salesforce means that anyone can download the content even though they don’t have a Salesforce login to your instance.

To do this, you need to:

1) Make sure that this Document has “Externally Available Image” checked.

2) Get the URL of this document by using the following URL.

https://c.<server>.content.force.com/servlet/servlet.ImageServer?id=<Document ID>&oid=<Organization ID>

For example:

Since the server is located at eu1 and if the Org ID is 00D200000007C7C, the URL should be:

https://c.eu1.content.force.com/servlet/servlet.ImageServer?id=015D0000001h32d&oid=00D200000007C7C

Salesforce Tips: Latest Field Type Release – Geolocation

Salesforce has recently released a new field data type called Geolocation (still in beta). Many customers from within the logistics industry and venue providers find it helpful in terms of:

  • it helps to calculate the distance between locations in supported units
  • the correct format of the coordinates can be stored
  • identify the traveling time from one place to another

Some information that can help developers understand this new data type are:

  • this feature is available to all editions
  • Geolocation data type consist of 3 custom fields which is accountable to your organisation’s limit. These three accounted fields are – latitude, longitude, and another for internal use.

  • in SOQL, the given sample query can be performed. Please note that the component fields (longitude and latitude) can only be queried.
    • Select Id, Name FROM Account WHERE Headquarter_Geolocation__Latitude__s = -37.8021710 AND Headquarter_Geolocation__Longitude__s = 144.9540820
  • formula functions availability for Geolocation and Distance can only be used together with a formula data type
  • For more details on the other possibilities and limitations, please refer to:
    https://help.salesforce.com/HTViewHelpDoc?id=custom_field_geolocate_overview.htm&language=en_US

The following screen shots show how the feature can be utilised. The main objective of the geolocation usage for the following illustration is for the Salesperson to know the distance between the Headquarter office and the Branch office. We have included the steps on achieving the objective.
1. Create a ‘Geolocation’ custom field for the Headquarter office
2. Create a ‘Geolocation’ custom field for the Branch office
3. Create a formula field as such utilising the Distance function: DISTANCE(Headquarter_Geolocation__c,Branch_Geolocation__c, “km”)
4. Assign the field to the layout accordingly
5. Get the coordinates of the locations (we use Google map in this example)

6. Populate the custom fields for the Headquarter/Branch office with coordinates from #5

Upon saving the coordinates, the user should be able to see the automated calculation of the distance between the two locations!