Subhendu Verma
IndividualForum Replies Created
-
Subhendu
MemberApril 29, 2019 at 10:55 am in reply to: Does JQuery have Functionalities that doesn't work in Salesforce Lightning Framework?Hi Parantap,
Jquery will work fine as far as you are only performing basic operations like changing css, attribute etc. It is said that Locker Service doesn't allow you to manipulate DOM using Jquery. A large set of functions Locker service disable for DOM elements within scope. So, there are ample chances of Jquery break.
-
Subhendu
MemberMarch 16, 2018 at 1:55 pm in reply to: How can we post message along with some fields to yammer user profile when opportunity is created?Hi Malhari,
You can do this is following way:
- Have a util class with a future method in it with the param String to be sent. This future method will be making API callouts to Yammer for posting the message.
- Have insert triggers on Opportunity as well as Task.
- In both the triggers, get the values to send in the message and create a string, call the future method from util class and pass the message String.
- Make API callouts in the future method as Salesforce does not allows making API callouts in the same transaction of Trigger.
Thanks,
Subhendu
-
Subhendu
MemberJanuary 24, 2018 at 10:58 am in reply to: Which type of encryption is preferred in Salesforce to ensure Higher standards of security?Hi Manpreet,
It depends on what you aspire as both products have merit depending on your specific business' needs. Both of these services are trustworthy and they functionally do similar things.
Salesforce Shield is a product offering from Salesforce that provides data encryption at rest. It sits within the Salesforce cloud, but you have control of your encryption keys. Every field that is marked for encryption is encrypted using two keys where one is generated by Salesforce and the other is known as the tenant key. Tenant keys can be generated every four hours and these are not familiar to Salesforce and are exported by clients and then deleted from Salesforce. If it’s deleted from Salesforce, then any data encrypted using that key cannot be decrypted unless the same key is imported. Recently, Salesforce brought in the BYOK( Bring Your Own Key) factor, where clients can generate keys and supply it to Salesforce for encryption purpose.
CipherCloud is a third party product that provides data encryption and tokenization at rest and is typically installed on-premise within your company's data center and your keys are managed within that environment. All your data go through it to salesforce and CipherCloud transparently inspects data and applies granular protection policies before data is sent to Salesforce.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 24, 2018 at 10:24 am in reply to: if the field is blank more than 10 days of record creation in Salesforce, we need to send a mail.Hi Pavan,
As per my understanding, you will need to write an Apex Batch and schedule it to run every day at 12:00 AM (i.e. midnight). In the Start method of the batch class, you will have to fetch all the all the records that have a blank value in the field you need to check and Event Start Date - Days in Advance to send email notification is equal to Today. Now, since you have all the records fulfilling your criteria, you can write the logic to send email in the Execute or Finish (if you need to perform some operation before sending mail) method of the batch.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 24, 2018 at 8:55 am in reply to: How Clickjacking Helps in securing Salesforce Visualforce Pages?Hi Manpreet,
Clickjacking is a type of attack that tries to trick a user into clicking something, maybe a button or link, because they perceive they are clicking something safe. Instead, the button or link performs malicious actions on your site leading to data intrusion, unauthorized emails, changed credentials, or other site-specific actions.
There are a two commonly employed techniques to prevent clickjacking - frame-busting scripts and the X-Frame Options header. Salesforce leverages both of the methods as standard clickjacking protection. You can view your protection settings in Setup. Enter Session Settings in the Quick Find box, then select Session Settings. By default all standard Salesforce pages are protected against clickjacking; If not, you can contact Salesforce Support to enable it in your Org.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 24, 2018 at 8:00 am in reply to: How is Two Factor Authentication implemented in Salesforce Login?Hi Manpreet,
Two-factor authentication in Salesforce is a two-step login process. In this process, once the user logs in using their username and password, a token or passcode is sent to their device, which they need to enter in order to finally log in. The user needs to download supported Authenticator app for their mobile devices. Once the admin has set up the Two Factor Authentication for that user; next time the user logs in, he will be asked to complete the second step of verification i.e. a QR code will be shown on the screen after entering user credentials, the user will then need to scan the QR code with the help of Authenticator app and enter the code generated by that QR code.
Hope this answer your query.
Thanks,
Subhendu -
Subhendu
MemberJanuary 16, 2018 at 12:21 pm in reply to: How can I find whether the current user has access to a record without querying in Salesforce?Hi Ratnakar,
As far as I know, you need to make a query on UserRecordAccess with UserId and Record Id to find if the record is accessible by the user. You can think of using describeSObject and check for access, but it will provide you access details on Object level not record level.
There is another approach, not sure if it's the best solution but you won't need to make a query in this approach. You can create a with sharing class and create database Savepoint in it then try to update and delete the record. Check for errors in both the operations and then rollback to the savepoint. If the user does not have record access you will get an error. As I said earlier, I do not recommend this approach and as per my understanding, the best way is to make a query.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 16, 2018 at 10:43 am in reply to: What is the difference between assert() and assertEquals() with example in Salesforce?Hi Ankit,
System.assert take two parameters, first is the condition to check and second the msg to log if the condition is true. Whereas, System.assertEquals take three parameters first two are the values to compare and the third one to log msg.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 16, 2018 at 7:43 am in reply to: What are bindings in Salesforce Visualforce? How to use them?Hi Ratnakar,
Visualforce bindings provide you the leverage to bind data & actions to your page. There are three types of bindings available in Salesforce:
- Data binding
- Action bindings
- Component bindings
Data bindings refer to the binding dataset to your page from the controller. Action bindings refer to the binding action methods to your page defined in the controller. Component bindings refer to the binding of other Visualforce components with your page.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 16, 2018 at 6:57 am in reply to: Distinguish between REST Class And SOAP Class in SalesforceHi Ratnkar,
You can identify your web service class them by viewing the code. If the class has annotation '@RestResource' then it's REST-based and if it has 'webservice' member variables and a 'webservice' method then it's SOAP-based class.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 16, 2018 at 6:38 am in reply to: What is child relationship name of Account and Contact in Salesforce?Hi Ratnakar,
The answer to your query is "Contacts".
The standard relationship between Salesforce objects is named by the Plural name of the object that has the relationship field. If you have defined any custom relation fields, then the relationship would be named by the name of custom field appended with "__r".Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 15, 2018 at 3:14 pm in reply to: Can report data be accessed programmatically through Salesforce Apex?Yes Ratnakar, you can access SFDC report data via Reports REST API.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 12, 2018 at 12:27 pm in reply to: How to perform inner query in SOQL (Salesforce Object Query Language)?Hi Ankit,
You need the relationship name to perform inner SOQL query. For example, if you are going to perform a query to get Accounts along with their contacts then your query will be something like -
Select Id, Name,(Select Id, LastName from Contacts) from Account.
Where Contacts is the relationship name between Account and Contact.
Hope this helps,
Thanks,
Subhendu
-
Subhendu
MemberJanuary 12, 2018 at 6:37 am in reply to: What is the basic difference between Standard, Custom and Extension Controllers in Salesforce?Hello Kapil,
The Controllers are used to control data behavior on a Visualforce Page. If you want your page to have the standard behaviors that are provided by Salesforce than you will be using Standard Controllers. Salesforce Provided standard controllers for most of the standard and custom objects.
Extensions are not actually controller, they are used to extend the functionalities of a standard salesforce controller. These are used in conjunction with standard controllers. You can have a single controller and multiple extensions on a visualforce page.
The custom controllers are apex classes which are used provide custom behavior to a visualforce page.
Hope this clarifies you on your query.
Thanks,
Subhendu -
Subhendu
MemberJanuary 12, 2018 at 6:17 am in reply to: What is the difference between SOSL queries and SOQL queries in Salesforce?Hi Kapil,
As the name suggests SOQL is Salesforce Object Query language and SOSL is Salesforce Object Search Language. The first one is used to query on Salesforce objects, it allows you to perform DML operation on the query result. The latter is used to perform the search operation on Salesforce objects, it does not allow you perform DML on its result. SOSL is used when you don’t know which object or field your data resides in.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 11, 2018 at 6:56 am in reply to: Update Multiple sobject records batch class in SalesforceHi Ratnakar,
Yes, you can update different sObject records in a single batch class. You will have to create a batch implementing Database.Batchable<String>, and Database.Stateful. Then create List of sObjects to store the records that you wish to update. Initialize the list in the constructor. Now, populate the lists in Start with the records that you will be processing in next steps. Access these lists in Execute method and perform Operations on it. Since you have implemented Database.Stateful, you will be able to perceive the values populated in lists throughout the Batch.
Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 10, 2018 at 11:43 am in reply to: I want to count related Contact in a Account.How can i do this in salesforce Apex Code?Hi Suraj,
A much-optimized code would be -
Public static Map<Id,Integer> countRelatedContact( Set<Id> accId){
Map<Id,Integer> relatedCountMap = new Map<Id,Integer>();
if(!accId.isEmpty){for(Account acc : [select Id, name,(Select Id, Name from Contacts) from Account where Id in:accId];){
relatedCountMap.put(acc.Id,acc.Contacts.size());
}return relatedCountMap;
}This will return a Map of Account Id and # of related Contacts to that Account record. Hope this helps you as per your scenario.
Thanks,
Subhendu -
Subhendu
MemberJanuary 10, 2018 at 6:50 am in reply to: What marketing automation software can integrate and utilize data from Salesforce custom objects?Hi Obivan,
There are several marketing tools available such as Marketo, Pardot, Act-On, etc. You can choose any one of them as per your requirement. Hope this helps.
Thanks,
Subhendu
-
Subhendu
MemberJanuary 9, 2018 at 2:16 pm in reply to: Help me on the given Salesforce Trigger ScenarioHi Sajid,
You can have a trigger something like --
trigger calculateAmount on Contact(after update,after insert){
set<Id> idList = new set<Id>();
List<Account> accList = new List<Account>();
for(Contact con: Trigger.new){idList.add(con.AccountId);
}
List<Account> accList = [Select Id,Rollup_Amount_X__c,Rollup_Amount_Y__c (Select Id,Amount_X__c, Amount_Y__c, Type__c from Contacts) from Account where Id in:idList];for(Account acc: accList){
Integer amountx=0;
Integer amounty=0;
for(Contact con: acc.Contacts){if(con.Type__c=='Positive'){
amountx += con.Amount_X__c;
}else{amounty += con.Amount_Y__c;
}
}
acc.Rollup_Amount_X__c = amountx;
acc.Rollup_Amount_Y__c = amounty;
accList.add(acc)
}update accList;
}Hope this helps.
Thanks,
Subhendu -
Subhendu
MemberJanuary 9, 2018 at 2:00 pm in reply to: Can we create a big object using Metadata API in Salesforce?Hi Charan,
Yes, you can create a big object from Metadata API using tools like Workbench. You need to define the structure of your Big object in an XML file and deploy it to your Salesforce Organization.
Thanks,
Subhendu -
Subhendu
MemberJanuary 9, 2018 at 1:48 pm in reply to: How many Salesforce Reports can a Dashboard contain?Hi Suryadeep,
Each dashboard can have up to 20 components. So you can have maximum 20 components on your dashboard.
Thanks,
Subhendu
-
Subhendu
MemberJanuary 9, 2018 at 8:29 am in reply to: What is meant by Outbound messages and how is it different from generating email ?Hello Kapil,
Outbound messages are used to send notifications from Salesforce environment to any external environment. Whereas email update is used to send email notifications. For better understanding, suppose there is an external service which has been integrated with your Salesforce environment. You have a requirement where you need to send some automated notification to that external service from Salesforce environment, in such scenario you will be using Outbound messages.
Thanks,
Subhendu -
Subhendu
MemberJanuary 9, 2018 at 8:19 am in reply to: How to insert duplicate values using Salesforce DataLoader?Hi Ravi,
The Dataloader process the records in batches and check for duplicates in each batch. The default batch size is 200 records. So what you can do is, set batch to such a number that the batch does not contain duplicate records and use Upsert DML instead of Insert. In such a way the Data Loader will not give any error, as no batch will contain duplicate. For changing batch size you can follow steps as below -
- If you are using Data Loader manually then please go to Settings and find Batch Size. You can change the batch size as per your requirement.
- If you are using Data Loader with the command line then go to the XML file and find<entry key="sfdc.loadBatchSize" value="200"/>. Now change the value to let say 10 as <entry key="sfdc.loadBatchSize" value="10"/>
If you are not able to formulate a suitable batch size, then you can set the batch size to 1. Although it will increase the processing time by 200 times, it's worth to give it a try.
Please let me know if you are still facing any issue/error.
Thanks,
Subhendu
-
Subhendu
MemberJanuary 5, 2018 at 12:18 pm in reply to: How to control the data of a Picklist in Salesforce?In continuation of my previous reply, you also have to call the actiosupport on html-oninput event as OnChange only works when you select any value. html-oninput event fires as soon as you select any value.
-
Subhendu
MemberJanuary 5, 2018 at 12:08 pm in reply to: How to control the data of a Picklist in Salesforce?Hi Rahul,
As per my understanding, you are trying to have values in picklist depending upon the value in datetime field and you need to refresh it if the value in that field is changed. You can achieve this on a visualforce page. You will need to override standard buttons on Case Object to call that visualforce page. The flow of the code will be somehow like-
- Have an <apex:actionSupport> that will call the controller method to get picklist values on OnChange event of that datetime input field.
- Pass the value of datetime field using <apex:param> to controller.
- Calculate the values that you need to show in picklist based on the value entered in datetime field in the controller method and generate a list of the desired picklist values.
- Assign the list of picklist values to a Property defined in the controller. Have that property called on that picklist field.
In such way, the picklist values will populate on the fly while editing the record. You can either create a custom controller or you can set standard controller as Case on the page and implement this logic in page extension.
Hope this gives you an idea of how you can achieve what you aspire.