Assign a single result from a SOQL query into a string variable
String name = [SELECT Name FROM Account].Name;
String name = [SELECT Name FROM Account].Name;
Id myRecordId = 'a0V9000000KWdz3EAD'; String sObjName = myRecordId.getSObjectType().getDescribe().getName();
Apex Code:
public class DisplayAllFieldsClass { public map<string,schema.sobjectfield> data {get;set;} public DisplayAllFieldsClass (){ data = Schema.SObjectType.BISWAJEET__Student__c.fields.getMap(); } }
Visualforce Page Code:
<apex:page doctype="html-5.0" showheader="false" controller="DisplayAllFieldsClass"> <apex:datatable value="{!data}" var="d"> <apex:column headervalue="Field Name"> {!d} </apex:column> </apex:datatable> </apex:page>
<apex:page sidebar="false" id="TestPage"> <p>Inner Visualforce Page Before</p> <apex:include pagename="TestChart"></apex:include> <p>Inner Visualforce Page After</p> </apex:page>
Note: Here in above sample visualforce page “TestPage” is the main page and “TestChart” is another visulaforce page within “Testpage”.
Sometimes we need to customize the email that goes out to an approver with the record approve link, Where can approver find the link to approve or reject the record.
We can use the Merge field {!ApprovalRequest.External_URL}
or {!ApprovalRequest.Internal_URL}
to add approve link in email template.
Follow below steps:
Note: Approval process merge fields can be used in email templates, but not mail merge templates. Because email notifications to a queue aren’t intended for an external audience, any instances of the merge field {!ApprovalRequest.External_URL}
in the email template are sent as the equivalent internal URL.