Skip to main content

Posts

Showing posts from May, 2018

Deploying Metadata Migration Failed

While Deploying Metadata in your Org thru ANT tool fails with below error, even though you have enter the right username and password with security token and URL.  BUILD FAILED D:\Salesforce Migration Tool\salesforce_ant_38.0\sample\build.xml:60: Invalid username, password, security token; or user locked out. In this case, its quite possible that, you are deploying Apex classes to production environment, and total test coverage is not greater than 75% or all the Classes or not covered with test classes.  In case you are deploying to another sandbox or dev environment then you don't need to test your classes.

Multiple active sessions of API connection with external system

Sometimes, when an API connects with an external system, it cannot use same session and hence will be requesting new session (previous session will still be active) each time it connects with Salesforce. In such scenarios many questions arise as below.  - What happens to previous sessions? - Do they expire automatically after 120 minutes? - At a given time, how many active sessions there can be? - What are the implications of multiple open sessions at given point in time?  Depending on how they are created, your session responds accordingly. For example, if you are using the SOAP API to call login () with the same credentials from a single device, you will likely get the same session Id back. Beware of calling logout () here, as you will end both (being the same session). Expiry time will be controlled by the configuration. Default is 120 minutes after last activity, but this can be changed. The limiting factor in terms of usage will be the Concurrent API Request

How to add Related List to the Opportunity page Layout?

In order to add Related List to the Opportunity Page Layout, follow below steps.  ·          One of the requirements is that the respective Custom Object should have a relationship (Master Detail or Lookup) with the standard Opportunity object. You can accomplish this by creating a custom field of type Master Detail or Lookup on your Custom Object where Opportunity is the parent . ·          Next step would be navigate to  Setup > Opportunity in Quick Find within Side Panel > Page Layouts > Edit > Related Lists from the top panel > Drag and drop the appropriate related list from the top panel to the page layout > Save.

Finding and Deleting Duplicate Records in Salesforce

Let’s suppose you have duplicate records in an entity, say Opportunities with some custom field Opportunity Number being same for multiple records. These are redundant records which may not be useful and you want to get rid of it.  In order to delete these records, you may think of making this field as unique but, this is not allowed without removing duplicates in this field.  One of the ideal option is to go to developer console (Setup > Developer Console) and run below query.  1 select   id,name,Oppty_Number__C from   opportunity order   by   Oppty_Number__C   With this you can not only see the opportunity records but also edit and delete the unwanted ones.  Also, not in the above query you can user "Group By" clause, but if you use this you cannot edit the resulting records. 

Updating All Parent Accounts when Child Account is updated

There are many ways you can achieve this as below.  1.      Process Builder   1.      System Administrators can do it easily 2.      Irrespective of Master Detail or Lookup, should work 2.      Apex Trigger 1.      This is helpful if you have advanced processing logic that is needed. 2.      If you go with this option, remember to make a custom setting to that you can use it to turn a trigger on or off without deactivating it through a code deployment.  3.      Cross Object Formula 1.      If you have a reference to the child account on the parent account, you can use a formula (checkbox) to do this. 2.      Provided your object relationship is Master Detail all the way in the hierarchy

Steps to Create Reports in Salesforce

Here are the rough steps to create the Reports in Salesforce. 1. Go to Report tab 2. It show the 3 window panes, one for Field lists, Filters and Preview 3. You can easily add columns by dragging or double clicking and do the same for multiple fields by pressing control key By default it shows in Tabular format. Lets take the example of Opportunities. 4. Once columns are final for the opportunities, click the drop down icon on desired column say "Lead Source" and select "Group by this field". Report format changes from Tabular to summary. 5. Now lets do the Summarize on the Amount field, by clicking drop down and select "Summarize" with SUM function ( Available options = Sum, Avg, Max, Min) 6. It shows the Sum of amount for each lead source and a grand total in the end. 7. You can Show or Hide the details of all records and keep only Summary 8. Also you can add More fields to summary  like Type, Probability etc 9. Finally you can