How to concatenate as string in Salesforce?
There is no specific method in Salesforce Apex for String Concatenation. We can use plus(+) operator for string concatenation. Please check the sample code where two integers are converted to ....
There is no specific method in Salesforce Apex for String Concatenation. We can use plus(+) operator for string concatenation. Please check the sample code where two integers are converted to ....
Sample Code: Visualforce page: <apex:page showHeader="false" controller="Sample" > <apex:panelGrid width="100%" style="text-align:right;"> <apex:form > <apex:commandLink value="Print" onclick="window.print();"/> </apex:form> </apex:panelGrid> <apex:pageBlock title="Member Information"> <apex:pageBlockTable value="{!MemberList}" var="m"> <apex:column value="{!m.Name}"/> <apex:column value="{!m.City__c}"/> <apex:column value="{!m.Country__c}"/> ....
AggregateResult in Salesforce is used to find Sum, Min, Max and Avg. It is similar to Aggregate function in SQL. Using Aggregate Result, we cannot fetch data. It is mainly ....
Sample Code: Visualforce page: <apex:page controller="Sample" sidebar="false" action="{!fetch}" contentType="text/plain/#emp.txt" cache="false"> Employee Number : {!emp.Name} Employee Name : {!emp.Employee_Name__c} City : {!emp.City__c} Email : {!emp.Email__c} Description : {!emp.Description__c} </apex:page> Apex Controller: ....
Sample Code: Visualforce page: <apex:page controller="Sample" sidebar="false"> <apex:pageBlock > <apex:repeat value="{!numbers}" var="num"> <apex:outputText >{!num}</apex:outputText> <br/> </apex:repeat> </apex:pageBlock> </apex:page> Apex Controller: public class Sample { public List<Integer> numbers {get;set;} Transient Integer ....
Apex Controller: public class acctTemplt { public Id accountId {get;set;} public List<Opportunity> getopptys() { List<Opportunity> oppty; oppty = [SELECT Name, StageName FROM Opportunity WHERE Accountid =: accountId]; return oppty; } ....
Only standard style sheets can be used in apex:pageBlockTable tag in aVisualforce page. <apex:pageBlockTable> must be contained in <apex:pageBlock> or <apex:pageBlockSection>. If we want to add custom style sheets we have to use apex:dataTable tag ....
Multiple ids should be used in the reRender attribute to Rerender multiple sections in VisualForce page. Sample Code: Visualforce page: <apex:page controller="SampleVisualforcePageController"> <apex:form > <apex:pageblock > <apex:pageblockSection id="membersBlock" title="Member Details" > ....
Sample Code: Visualforce page: <apex:page controller="Sample" sidebar="false" ><apex:pagemessages /><apex:form > <apex:pageblock > <apex:pageBlocksection > <apex:pageblockSectionItem >Name:</apex:pageblockSectionItem> <apex:pageblockSectionItem ><apex:inputtext value="{!nam}" /></apex:pageblockSectionItem> <apex:pageblockSectionItem >Age:</apex:pageblockSectionItem> <apex:pageblockSectionItem ><apex:inputtext value="{!age}" /></apex:pageblockSectionItem> ....
Salesforce provides REST API to Create, Update and Delete records. We can also define Apex as a REST Service to Create, Update and Delete records in Salesforce. Example: Follow the ....