Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Version published after converting to the new editor

Child pages (Children Display)
alltrue
depth1
styleh4
sorttitle
excerptTyperich content

...

Section

Show Custom UI Button from Record

Panel
borderColorblack
borderStylesolid
titleLaunch your webapp from a record

Not only can you define a tab on the Pulsar home page, but you can define a button on a particular record, so that the user can open a custom webapp from a particular record.

The advantage of this is that the Record ID will be passed as an argument to the webapp which can then be used to look up relevant information and display (without the user having to specifically select the record).

Here is how you can configure Pulsar Settings to show your webapp from a record.

Let's say we wish to display the custom webapp from an Account object. (Note that it could be displayed on any object – just replace Account in the following examples with the API name of any object). 

1. Find the Id of the document you wish to display on the Account page. The easiest way is to navigate to the document in the content libraries and record the DocumentID from the URL in the browser’s navigation bar.

Panel
titleExample

https://na15.salesforce.com/sfc/#version?selectedDocumentId=069i0000001i3wP


2a. Add a Pulsar Setting with the following key and use the DocumentID as the value. Additional documents may be added to the setting, one per line or separated by commas.

NameShow Tabs on Object Detail Screen

Key

pulsar.layout.<ObjectAPIName>.doclist

Value

List of DocumentIDs (e.g., 069i0000001i3wP), separated by newlines or commas/semicolons

Default Value (if any)


Compatibility
  •  iOS
  •  Windows
  •  Android

Description

This setting will add a button to the toolbar shown when you select an Account. You will see the name of the document in a popup list, and selecting that document will open the document.
Notes/Comments

Example keys : pulsar.layout.Account.doclist and pulsar.layout.Custom_Obj__c.doclist

Example values : 069i0000001i3wP;069E00000024nI0


2b. If you would like to restrict this functionality to only certain record types (for example, a record type with developer name 'Account_Type_1'), you would use the following syntax for the key.

NameShow Tabs on Object Detail Screen for Record Type

Key

pulsar.layout.<ObjectApiName>.<RecordTypeName>.doclist

Value

list of DocumentIDs (e.g., 069i0000001i3wP), separated by newlines or commas/semicolons

Default Value (if any)


Compatibility
  •  iOS
  •  Windows
  •  Android

Description


Notes/CommentsExample keys : pulsar.layout.Account.Account_Type_1.doclist and pulsar.layout.Custom_Obj__c.A_Record_Type.doclist


3. Optional – Attach a new image as icon on doclist.

NameDocList Icon Setup
Keypulsar.layout.<ObjectAPIName>.doclist.icon
Value
Compatibility
  •  OS
  •  Windows
  •  Android
DescriptionThis setting lets you show a custom image rather than the standard HTML icon displayed on the toolbar of a record. You would create this Pulsar Setting, save and attach an image to the setting, and then it will be used as the button image instead of the standard image.
Notes/CommentsThe custom icon image should be a square PNG image (same height and width) and be approximately 50px by 50px in size.  We recommend that you use a simplified design in your image as iOS will transform the image into a monochromatic icon.  It should also have transparency, anti-aliasing, and no drop shadow that uses a mask to define its shape.



Panel
titleExample Screen


Getting the RecordId in Javascript

Panel
titleReferencing the record ID from your webapp

The record Id is passed to the webapp using URL query parameters. The parameter name is ref_id and it is accessed from Javascript based on the URL string. See the following example:

Code Block
function getQueryVariable(variable) {
    var query = window.location.search.substring(1);
    var vars = query.split("&");
    for (var i=0; i<vars.length; i++) {
        var pair = vars[i].split("=");
        if (pair[0] == variable) {
            return pair[1];
        }
    }
}
var objectId = getQueryVariable("ref_id");



...