Yogesh Sharma
IndividualForum Replies Created
-
Yogesh
MemberSeptember 30, 2019 at 2:53 pm in reply to: What are the different data types that a salesforce standard field record name can have?Hello,
A standard field record name can have data type of either auto number or text field with a limit of 80 chars.
For generating auto numbers, the format needs to be specified while defining the field and after that for every record that is added, the number will get auto generated. For example:-
Sr No-{1}
Sr No-{2}
Sr No-{3} -
Yogesh
MemberSeptember 30, 2019 at 2:51 pm in reply to: How can you call a controller method from JavaScript in salesforce?Hello,
using the tag apex:actionFunction(A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An component must be a child of an component.)
for an exaple :-
Controller:-
public class controller{
public pageReference noiseSearch(){
//logic
return null;
}
}vf page:-
So your button will be<apex:commandButton value="Search" onclick="check();" reRender="nPbt" />
And your script function
function check(){
var user = document.getElementById('pg:frm:nPB:ip').value;
if(user == ''){
alert('Please Enter noise Name before Proceeding.');
return true;
}
else
noiseSearchAF();
return true;
} -
Yogesh
MemberSeptember 30, 2019 at 2:47 pm in reply to: How can I embed a salesforce lightning component in visualforce page?Hello,
There are three steps to add Aura components to a Visualforce page.
1.Add the Lightning Components for Visualforce JavaScript library to your Visualforce page using the <apex:includeLightning/> component.
2.Create and reference a Lightning app that declares your component dependencies.
3.Write a JavaScript function that creates the component on the page using $Lightning.createComponent(). -
Yogesh
MemberSeptember 30, 2019 at 2:44 pm in reply to: What is the use of lightning:select in salesforce?Hello,
A lightning:select component creates an HTML select element. This component uses HTML optionelements to create options in the dropdown list, enabling you to select a single option from the list. Multiple selection is currently not supported.
This component inherits styling from select in the Lightning Design System.
-
Yogesh
MemberSeptember 26, 2019 at 10:08 am in reply to: What is the procedure to get the Security token in Salesforce?Hello,
To access your security token, go to "Setup" (shows up in the upper right corner, under your name). In the left side menu column (under Personal Setup), open the drop-down item “My Personal Information.” The option to reset your security token will appear right under password reset option.
In the left side menu segment (under Personal Setup), open the drop-down thing "My Personal Information." The alternative to reset your security token will come up right under the password reset choice. Salesforce will send you an email containing your new security token. It's suggested that you save this email in a safe area so you don't need to reset your security token every time when you need it.
-
Yogesh
MemberSeptember 26, 2019 at 10:04 am in reply to: How to invoke batch apex job programmatically in salesforce?Hello,
Run Batch Apex
1. From the Developer Console, click Debug | then Open Execute Anonymous Window.
2. Execute the following code.
Id <variable name>= Database.executeBatch(new <Class name>(), batch size);
Example code
Id batchJobId = Database.executeBatch(new RunThisBatch(), 200);
NOTE: batchJobId will contain the job Id of the batch.Thanks
-
Hello,
Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. The values can be translated into any language Salesforce supports.To access custom labels , use the $Label global value provider. -
Yogesh
MemberSeptember 23, 2019 at 2:01 pm in reply to: How to Disable Button in LWC in salesforce?hello ,
you can do it by just using the attribute 'disabled' with the value false in the button tag .
-
Yogesh
MemberSeptember 23, 2019 at 2:00 pm in reply to: What is Lightning Component Bundle in Salesforce?Hello,
A component bundle contains a component or an app and all its related resources.
These are the following:
a. Component
b. Controller
c. Helper
d. Style
e. Document
f. Design
g. SVG
h. Renderer -
Yogesh
MemberSeptember 23, 2019 at 11:24 am in reply to: Does Lightning Component create for and the desktop and the mobile user interfaces in Salesforce?Hello,
You can use Lightning Components directly in Lightning Experience, the Salesforce1 Mobile app, template-based communities, and custom standalone apps. You can include Lightning components in a Visualforce page, allowing you to use them in Salesforce Classic, Console, and Visualforce-based communities.
-
Yogesh
MemberSeptember 23, 2019 at 11:14 am in reply to: How to convert visualforce page into excel format in Salesforce?Hello,
By simply modifying the ContentType attribute on the <apex:page> tag, your Visualforce page code will automatically generate an Excel document. For example, the following code will create a table of Contact data for a given Account. After # in the contentType attribute value, it is the name of the excel file that will be generated and you also need to mention the file extension like .xls . For successfully running the below code you need to provide the valid account id in URL.
sample Vf code:-
<apex:page standardController="Account" contenttype="application/vnd.ms-excel#Demo Example.xls">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!account.name} account.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.Contacts}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.Phone}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page> -
Hello ,
Its a Interface,This interface lets you build your app with Lightning components, and deploy it anywhere and to anyone.
A Lightning Out dependency app with the ltng:allowGuestAccess interface can be used with Lightning Components for Visualforce and with Lightning Out.
Using Lightning Components for Visualforce, you can add your Lightning app to a Visualforce page, and then use that page in Salesforce Tabs + Visualforce communities. Then you can allow public access to that page.
Using Lightning Out, you can deploy your Lightning app anywhere Lightning Out is supported—which is almost anywhere! -
Yogesh
MemberSeptember 20, 2019 at 10:52 am in reply to: What is the Data Type of LastModifiedDate Field in the Opportunity Statndered Object of Salesforce?Hello,
its a 'Date time' data type.
-
Yogesh
MemberSeptember 5, 2019 at 3:30 pm in reply to: What is the use of @InvocableMethod annotation in salesforce?Invocable Method annotation used to identify methods that can be run as invocable actions.
Invocable methods are called with the REST API and used to invoke a single Apex method. Invocable methods have dynamic input and output values and support describe calls. -
Salesforce introduced a mobile support solution for Service Cloud users. With this solution you can add a help button to your native iOS or Android mobile application that lets your customers connect with agents over a one-way video and two-way audio chat. Like the Amazon Mayday Button, Service Cloud SOS also supports screen sharing and interaction, meaning the representative can view and make marks on the end user's screen to point out important pieces of information.
You can customize and configure SOS to create a rich experience that maps to the core properties of your brand. Improve customer interactions with a seamless native approach that will revolutionize the way your customers think about customer service.
Advantages of SOS feature
-Supports native and hybrid apps
-IOS and Android
-LTE/4G and Wifi
-Two way Audio
-One way Video (Agent video streams to Customer)
-Field Masking
-Session Recording -
Hello deepak,
Snap-Ins Chat
https://help.salesforce.com/articleView?id=snapins_chat_setup.htm&type=5
You can add Snap-ins Chat to the website , customers can get answers to their questions by chatting with an agent while browsing your site.
Snap-ins Chat uses Live Agent, but with a simpler setup, to power your chats. -
Yogesh
MemberSeptember 4, 2019 at 3:03 pm in reply to: What are various email templates that can be created in Salesforce?Hello Dear,
You can see all Types of Classic Email Templates on this link below:-
https://help.salesforce.com/articleView?id=email_templates_classic_types.htm&type=5
-
JavaScript remoting in Visualforce provides support for some methods in Apex controllers to be called via JavaScript.
JavaScript remoting has three parts:
The remote method invocation you add to the Visualforce page, written in JavaScript.
The remote method definition in your Apex controller class. This method definition is written in Apex, but there are few differences from normal action methods.
The response handler callback function you add to or include in your Visualforce page, written in JavaScript.
To use JavaScript remoting in a Visualforce page, add the request as a JavaScript invocation.for example cheak it oput this link:-https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_js_remoting_example.htm
-
Yogesh
MemberAugust 29, 2019 at 8:32 am in reply to: How do I make multi-select picklist in Lightning Component in Salesforce?Hello,
We can use lightning:dualListbox component to show multi select picklist field values. lightning:dualListbox component represents two side-by-side list boxes.
-
Yogesh
MemberAugust 28, 2019 at 12:38 pm in reply to: Why lightning:datatable is not supported on mobile devices in Salesforce?The current version of lightning:datatable is not supported on mobile devices.
https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/documentationAs an alternative, you can use grid or lightning: layout.
-
Yogesh
MemberAugust 27, 2019 at 11:19 am in reply to: What kind of data Type Wrapper Class Contains in salesforce?Hello ,
we use wrapper class in a apex controller class when there is a need of showing multiple dataTypes in a list so in case of apex we can use all three types of data types as following:-
- primitive data types
- Sobject data types
- Collection data types i.e list,map,set.
-
Yogesh
MemberAugust 26, 2019 at 11:36 am in reply to: Differentiate between Salesforce Object Query Language and Salesforce Object Search Language?SOQL:-
- SOQL (Salesforce Object Query Language ) retrieves the records from the database by using “SELECT” keyword.
- By Using SOQL we can know in Which objects or fields the data resides.
- We can retrieve data from single object or from multiple objects that are related to each other.
- We can Query on only one table.
SOSL:-
1. SOSL(Salesforce Object Search Language) retrieves the records from the database by using the “FIND” keyword.
2. By using SOSL, we don’t know in which object or field the data resides.
3. We can retrieve multiple objects and field values efficiently when the objects may or may not be related to each other.
4.We can query on multiple tables. -
Yogesh
MemberAugust 13, 2019 at 3:34 pm in reply to: Is there a functional difference between _ListSubscribers and _Subscribers with respect to STATUS?Status of a subscriber on a list (ListSubscribers) is not the same as the overall status in All Subscribers (Subscribers).
Lists are sub-sets of All Subscribers for which SFMC maintains status. Lists are sendable. Publication Lists are not.
You can be unsubscribed from a List and still be active in All Subscribers.
All Subscribers represents every subscriber in the entire Enterprise 2.0 account, not just a single business unit. Business unit membership and subscriber status are maintained in a hidden data view. The _Subscribers data view does not accurately reflect business unit status or membership.
-
hello, you can take help from this code below :-
trigger CountContactsnew on Contact (after insert, after delete, after undelete) {
List<id> accIdList = new List<id>();
if(Trigger.isInsert || Trigger.isUndelete){
For(Contact con1 : Trigger.new){
accIdList.add(con1.accountid);
}
}
if(Trigger.isDelete){
For(Contact con1 : Trigger.old){
accIdList.add(con1.accountid);
}
}
List<Account> accUpdateList = new List<Account>();
For(Account acc : [SELECT Contact_Recs__c,(SELECT id FROM Contacts) FROM Account WHERE id =: accIdList]){
acc.Contact_Recs__c = acc.Contacts.size();
accUpdateList.add(acc);
}
update accUpdateList;
}
} -
Yogesh
MemberAugust 13, 2019 at 12:54 pm in reply to: What is Database.Stateful in Salesforce Batch Classes?Hello,
The only time you need Database.Stateful is when the execute method modifies a class variable in a way meant to be used across multiple execute methods or in the finish method. The majority of batches you will ever write will not need Database.Stateful. It's important to know that using Database.Stateful will harm your batch's performance, because the class will be serialized at the end of each execute method to update its internal state. This extra serialization results in longer execution time.