To use lightning design system we don't need to upload library to static resource and reference them in visual force page. We can include them by using apex tag i.e <apex:slds/>. here is example of include of slds in visual force page.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<apex:page standardStylesheets="false" sidebar="false" showHeader="false">
<apex:slds/>
<apex:form>
<!-- Without lightning designing CSS--> ...
Friday, 14 April 2017
Thursday, 13 April 2017
How to get object name from ID of record
In Salesforce some time we have requirement to retrieve object name from record ID. So We can done this by two approach.
First approach
Get SObject type from record ID by using getSObjectType() method.
Convert Sobject type into string value.
1
2
3
4
Contact contactRecord = new Contact(FirstName = 'Test', LastName = 'Contact');
insert contactRecord;
// contactRecord.Id.getSObjectType() return Sobject Type of record then we convert them into String
String objectName = String.valueOf(contactRecord.Id.getSObjectType());
Second ...
Subscribe to:
Posts (Atom)