Forum Replies Created

Page 20 of 57
  • shariq

    Member
    September 22, 2018 at 3:29 AM in reply to: How to use same Report on multiple dashboard components in Salesforce?

    Hi,

    I think it would be helpful if within the dashboard component editing menu you could summarize the source report by different fields. This would allow one report to be used for multiple components in one dashboard without having to use the same base report and save separately just to filter by different variables

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:26 AM in reply to: Why do we need Security Token in Salesforce?

    Hi,

    Your Salesforce security token is a case-sensitive alphanumeric key that is used in combination with a password to access Salesforce via API. The purpose of the token is to improve the security betweenSalesforce users and Salesforce.com in the case of a compromised account.

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:25 AM in reply to: What do you mean by idempotent operation in Salesforce REST API?

    Hi,

    Idempotence is a funky word that often hooks people. Idempotence is sometimes a confusing concept, at least from the academic definition. From a RESTful servicestandpoint, for an operation (or service call) to be idempotent, clients can make that same call repeatedly while producing the same result

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:25 AM in reply to: What is the use of chatter in Salesforce?

    Hi,

    Chatter is an enterprise collaboration platform from Salesforce, a cloud-based customer relationship management (CRM) vendor.

    Chatter can be used as a company intranet or employee directory. Each employee has a profile page with photo and work-related information that explains what the employee’s role is within the company, who the employee reports to, where the employee is located and how to contact the employee. Employees can “follow” both people and documents to collaborate on sales opportunities, service cases, campaigns, projects and tasks. Like Facebook and LinkedIn, Chatter allows users to manage their feeds and control how notifications are received.

    Developers can incorporate Chatter features and capabilities to applications built on the Force.complatform. Salesforce offers Chatter in desktop and mobile versions.

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:23 AM in reply to: Why we avoid DML query in "before" trigger in Salesforce?

    Hi,

    In Before Triggers, actions are being performed before you commit the record to the database. This is where you usually do validations or updates to the same object. You can skip the DML operations here as whatever values you give in your code is automatically assigned to that record.

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:12 AM in reply to: What is recursion problem in Salesforce Trigger? How to troubleshoot it?

    Hi,

    Try this -

    In order to avoid the situation of recursive call, make sure your trigger is getting executed only one time. To do so, you can create a class with a Static Set

    Check if the record exists in the set, if so do not execute the trigger, else execute the trigger.

    NOTE: Before deploying into production, we recommend testing in sandbox.

    This is a sample code written for Account object Class code
    public class checkRecursive {
         public static Set<Id> SetOfIDs = new Set<Id>();
    }

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:10 AM in reply to: What is recursion problem in Salesforce Trigger? How to troubleshoot it?

    Hi,

    A recursive trigger is one that performs an action, such as an update or insert, which invokes itself owing to,  say something like an update it performs.

     

    eg in a before trigger, if you select some records and update them, the trigger will invoke itself.

    Hope this helps.

    • This reply was modified 7 years, 6 months ago by  shariq.
  • shariq

    Member
    September 22, 2018 at 3:05 AM in reply to: How can we convert Lead to Account through apex code?

    Hi,

    There is a standard LeadConvert class provided by salesforce which can be used in your scenario.

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:02 AM in reply to: How to attach file using Salesforce Lightning for Salesforce1?

    Hi,

    I found this online -

    This can be done with base64 encoding. The general pattern is as follows:

    Use JavaScript's FileReader's readAsDataURL to read the file selected by the file input into a String variable.
    Encode the contents using JavaScript's encodeURIComponent function.
    Call the @AuraEnabled action with the contents, content type, and the Id of the parent record.
    URI decode the contents.
    Base64 decode the contents
    Insert the attachment.
    There are limitations in the size of the file that can be transferred. I observed that limitation to be 1,000,000 characters. The solution to that is to chunk the file in to different pieces. That algorithm is slightly different, but basically boils down to iterating over the contents in chunks, and then concatenating them to the existing Attachment body.

    Use JavaScript's FileReader's readAsDataURL to read the file selected by the file input into a String variable.
    Call the @AuraEnabled action with the contents (URI encoded), content type, and the Id of the parent record.
    Insert the attachment (as done in the above steps) and return the Id back to the helper.
    For each chunk left:Call the @AuraEnabled action with the contents (URI encoded), and the Attachment Id.
    Retrieve the Attachment out of the DB (SOQL) and base64 encode its contents.
    Append the base64 chunk passed into the method with the existing body.
    Base64 decode it back into the body of the attachment.
    Update the attachment.

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 3:00 AM in reply to: How can we find the unused method in apex class?

    Hi,

    The "Find Usages" functionality within IntelliJ's plugin called Illuminated Cloud. The downside to this is that Illuminated Cloud is not free, but it certainly does a bang up job.

    If you do choose to use Illuminated Cloud you can use this functionality by right clicking on any variable, property, method, or class name and choosing "Find Usages."

    Hope this helps.

  • Hi,

    We can only perform dml on 10000 records per transaction.

    Hope this helps.

  • shariq

    Member
    September 22, 2018 at 2:56 AM in reply to: How can we use regex for searching in datatable in Salesforce?

    Hi,

    Try this -

    <aura:application extends="force:slds">
    <!-- backing data -->
    <aura:attribute name="data" type="List" />

    <!-- data table attributes -->
    <aura:attribute name="columns" type="List" />
    <aura:attribute name="filteredData" type="List" />

    <!-- filter input -->
    <aura:attribute name="filter" type="String" />

    <aura:handler name="init" value="{!this}" action="{!c.init}" />

    <lightning:input type="text" onchange="{!c.filter}" value="{!v.filter}" label="Filter" />
    <lightning:datatable keyField="name" columns="{!v.columns}" data="{!v.filteredData}" />
    </aura:application>

    Controller -

    ({
    init: function(component, event, helper) {
    var sample = [];
    // Create 10 random people
    [...Array(10).keys()].forEach(v=>sample.push({name:"Person "+(v+1), age: Math.floor(Math.random()*80)}));
    // initialize data
    component.set("v.columns", [{type:"text",label:"Name",fieldName:"name"},{type:"number",label:"Age",fieldName:"age"}]);
    component.set("v.data", sample);
    component.set("v.filteredData", sample);
    },
    filter: function(component, event, helper) {
    var data = component.get("v.data"),
    term = component.get("v.filter"),
    results = data, regex;
    try {
    regex = new RegExp(term, "i");
    // filter checks each row, constructs new array where function returns true
    results = data.filter(row=>regex.test(row.name) || regex.test(row.age.toString()));
    } catch(e) {
    // invalid regex, use full list
    }
    component.set("v.filteredData", results);
    }
    })

    Hope this helps.

  • Hi,

    Try this in your xml file -

    <types>
    <members>Account.PayeeNameOverride1__c</members>
    <members>Account.PayeeNameOverride2__c</members>
    <members>Contact.JobDescriptionDate__c</members>
    <members>Contact.JobDescription__c</members>
    <name>CustomField</name>
    </types>

    Hope this helps.

  • Hi,

    You can show a product in the quote line editor as a single quote line with multiple segments. Each segment represents a block of time (quarter, month, year, or custom) and has a quantity and discounts independent of the other segments. This feature is useful if you’re selling subscription products and services, because you don’t have to add multiple quote lines for each segment.

    You can apply discounts or uplifts to individual segments—for example, a start-up discount on the first year of a three-year service subscription. You can also adjust the quantities of each segment.

    Add MDQ (multi-dimensional quoting) segments to a product by creating a price dimension in your product’s Price Dimensions related list. The price dimension’s type controls whether your segments appear by year, quarter, month, custom, or as a one-time segment. You can also control whether users can edit the cost, quantity, or discounts of segments, or whether the segments inherit editability of these fields from their parent product record.

    After you create a dimension, Salesforce CPQ calculates the number of segments by considering the length of your quote’s term. For example, a product with a monthly price dimension and a two-year term might have 24 segments.

    To add a one-time charge, such as an installation fee, create a price dimension with a Type value of One-Time and set its unit price to a value of your choosing. The unit price overrides the product’s Price Book value. The one-time fee appears to the left of your segmented values in the line editor.

    EXAMPLE Your company sells generators and provides an installation service for $1000 and an annual generator service subscription for $500. You can use MDQ products to create a subscription product that handles the one-time fee and the subscription service together. Set up the Generator Service product as follows.Subscription Pricing: Fixed Price
    Subscription Term: 12
    List Unit Price: $500
    Now that you’ve made the subscription product, you can use price dimensions to include both the subscription fee and the one-time installation fee. Since both parts of the service have distinct pricing requirements, you’ll need to make two price dimensions: One for the one-time fee and another for the ongoing subscription. Go to the product’s Price Dimensions related list and create a price dimension as follows.

    Dimension Name: Generator Installation
    Type: One-Time
    Unit Price: $500
    Next, create another price dimension for the subscription service.

    Dimension Name: Yearly Service
    Type: Year
    By default, the time-based price dimension draws its pricing and proration from the subscription product.

    Hope this helps.

  • shariq

    Member
    September 21, 2018 at 2:05 PM in reply to: How to use salesforce wave analytics?

    Hi,

    Go to developer.salesforce.com/promotions/orgs/wave-de.
    Fill out the form using an active email address. Your username must also look like an email address and be unique, but it doesn’t need to be a valid email account. For example, your username can be yourname@waverocks.de, or you can put in your company name.
    After you fill out the form, click Sign me up. A confirmation message appears.
    When you receive the activation email, open it and click the link.
    Complete your registration, and set your password and challenge question. Tip
    Write down or remember your credentials. To log in and play, just go to login.salesforce.com.
    Click Save.

    Thanks

  • shariq

    Member
    September 21, 2018 at 2:04 PM in reply to: what is the benefit of the lightning component framework

    Hi,

    The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.

    Out-of-the-Box Component Set -: Comes with an out-of-the-box set of components to kick start building apps. You don’t have to spend your time optimizing your apps for different devices as the components take care of that for you.

    Rich component ecosystem-: Create business-ready components and make them available in Salesforce1, Lightning Experience, and Communities.

    Performance – :Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI, It intelligently utilizes your server, browser, devices, and network so you can focus on the logic and interactions of your apps.

    Event-driven architecture -: event-driven architecture for better decoupling between components

    Faster development – : Empowers teams to work faster with out-of-the-box components that function seamlessly with desktop and mobile devices.

    Device-aware and cross browser compatibility – : responsive design,supports the latest in browser technology such as HTML5, CSS3, and touch events.

    Thanks

  • shariq

    Member
    September 21, 2018 at 2:03 PM in reply to: How do we cache server side data on lightning component?

    Hi,

    The component calls a server method
    The framework checks if the response is available in the cache
    The response is available in the cache and needs to be refreshed (cached response age > refresh age)
    The framework calls the action callback function providing the cached response
    The framework calls the server method to get a fresh response
    The server returns the response
    The framework updates the cache with the new response
    If the server response is different from the cached response, the framework calls the action callback function for the second time with the updated response

    Thanks

  • shariq

    Member
    September 21, 2018 at 1:35 PM in reply to: What is the difference between HTTP Post and HTTP GET in Salesforce apex?

    Hi,

    HTTP GET:

    GET is idempotent: it is for obtaining a resource, without changing anything on the server. As a consequence it should be perfectly safe to resubmit a GET request.

     

    HTTP POST:

    POST sends data to a specific URI and expects the resource at that URI to handle the request. The web server at this point can determine what to do with the data in the context of the specified resource. The POST method is not idempotent, however POST responses are cacheable so long as the server sets the appropriate Cache-Control and Expires headers.

    The official HTTP RFC specifies POST to be:

    Annotation of existing resources;
    Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;
    Providing a block of data, such as the result of submitting a form, to a data-handling process;
    Extending a database through an append operation.

    Thanks

  • shariq

    Member
    September 21, 2018 at 1:34 PM in reply to: What is the difference between http methods PUT and POST in Salesforce?

    Hi,

    GET- In an HTTP GET request, key/value pairs are specified in the URL

    GET requests can be cached
    GET requests remain in the browser history
    GET requests can be bookmarked
    GET requests should never be used when dealing with sensitive data
    GET requests have length restrictions
    GET requests should be used only to retrieve data

    POST –  HTTP POST data is not visible in the URL, and when submitting data to a website.

    POST requests are never cached
    POST requests do not remain in the browser history
    POST requests cannot be bookmarked
    POST requests have no restrictions on data length

    HTTP PUT:

    PUT puts a file or resource at a specific URI, and exactly at that URI. If there’s already a file or resource at that URI, PUT replaces that file or resource. If there is no file or resource there, PUT creates one. PUT is idempotent, but paradoxically PUT responses are not cacheable.

    Thanks

     

  • shariq

    Member
    September 21, 2018 at 1:32 PM in reply to: How to swap 2 different component views in Salesforce Lightning?

    Hi,

    You can use the standard methods for lightning to swap components. $A.createComponent() method to create another component from one component and component.destroy () method to destroy the new created component.

    $A.createComponent(
    "c:AddAgreementComponent", // creating a component
    {
    "productWrapper": productWrapObj // setting the attribute of a component.
    },
    function(newComponent, status, errorMessage){
    if (status === "SUCCESS") {
    var body = component.get("v.body");
    body.push(newComponent);
    component.set("v.body", body);
    }
    }
    );

    Thanks

  • shariq

    Member
    September 21, 2018 at 1:18 PM in reply to: What are the Escalation Rules in Salesforce?

    Hi,

    Escalation rules automatically escalate cases when the case meets the criteria defined in the rule entry. You can create rule entries, which define criteria for escalating a case, and escalation actions, which define what happens when a case escalates.

    When Salesforce applies an escalation rule to a case, it inspects the case and compares the case to the criteria in the rule entry. If the case matches the criteria defined in the rule entry, Salesforce runs the escalation actions.

    Orgs typically use one escalation rule that consists of multiple rule entries. For example, your standard case escalation rule could have two entries: cases with Type set to Gold are escalated within two hours, and cases with Type set to Silver are escalated within eight hours.
    From Setup, enter Escalation Rules in the Quick Find box, then select Escalation Rules.
    Create the escalation rule.Click New and name the rule. Specify whether you want this rule to be the active escalation rule.You can have only one active escalation rule at a time.
    Click Save.
    On the Case Escalation Rules page, select the rule that you want to work with.The rule detail page is displayed.
    Create the rule entries. Rule entries define the criteria used to escalate the case.In the Rule Entries section, click New. For each rule entry, you can specify:Order in which rule entries are evaluated
    Criteria for escalating a case
    How business hours affect when cases escalate
    How escalation times are determined
    Click Save.The Escalation Actions page is displayed.
    Define the escalation actions. Escalation actions specify when the case escalates and what happens when the case escalates. You can add up to five actions for each rule entry to escalate the case over increasing periods of time.In the Escalation Actions section, click New. For each escalation action, you can:Specify when the case escalates: In the Age Over field, enter the number of hours after which a case escalates if it hasn’t been closed. You can enter the number of hours and either 0 minutes or 30 minutes. For example, 1 hour and 0 minutes or 1 hour and 30 minutes.
    Reassign the case to another user or queue, and select an email template that sends the new assignee (the new case owner) a notification email.
    Send notification emails to other users, the current case owner, or other recipients.
    Click Save.

    Thanks

  • shariq

    Member
    September 21, 2018 at 1:16 PM in reply to: Is it necessary to define an explicit primary key in custom objects?

    Hi Anjali,

    Salesforce provide a standard field id as a unique identifier for a record weather the record is a standard object record or a custom object record.

    Thanks.

  • shariq

    Member
    September 21, 2018 at 1:13 PM in reply to: Explain the uses of lightning:formattedNumber in Salesforce.

    Hi,

    In this example the formatted number displays as $5000.00

    <aura:component>
    <lightning:formattedNumber value="5000" style="currency" currency="USD" />
    </aura:component>
    In this example the formatted number displays as 50%.

    <aura:component>
    <lightning:formattedNumber value="0.5" style="percent" />
    </aura:component>

    Thanks

  • Hi,

    All tests started through the Salesforce user interface now run asynchronously. Tests that are run as part of a deployment, a package install, or a package upload still run synchronously.

    Thanks

  • shariq

    Member
    September 21, 2018 at 7:45 AM in reply to: What Are The Advantages Of Lightning ?

    Hi,

    The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.

    Out-of-the-Box Component Set -: Comes with an out-of-the-box set of components to kick start building apps. You don’t have to spend your time optimizing your apps for different devices as the components take care of that for you.

    Rich component ecosystem-: Create business-ready components and make them available in Salesforce1, Lightning Experience, and Communities.

    Performance – :Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI, It intelligently utilizes your server, browser, devices, and network so you can focus on the logic and interactions of your apps.

    Event-driven architecture -: event-driven architecture for better decoupling between components

    Faster development – : Empowers teams to work faster with out-of-the-box components that function seamlessly with desktop and mobile devices.

    Device-aware and cross browser compatibility – : responsive design,supports the latest in browser technology such as HTML5, CSS3, and touch events.

    Thanks

Page 20 of 57