Forum Replies Created

Page 5 of 6
  • Laveena

    Member
    August 21, 2019 at 4:44 am in reply to: Explain architecture of design pattern followed by Salesforce?

    Hi Piyush,

    You can refer this link-https://trailhead.salesforce.com/en/content/learn/modules/starting_force_com/starting_understanding_arch

    Thanks

    • This reply was modified 5 years, 3 months ago by  Laveena.
  • Hi Piyush,

    It is not possible to change the email address of the trailhead account. In this case, I suggest you to create a new trailhead account with the required email address. By using merge process , you can merge badges to the new account.
    Please find the suggested solution below:

    Create a new trailhead account with your personal E-mail address.
    Merge the old account with the above newly created account. Here is how to do that -Trailhead Self-Service Account Merge.

    Thanks

    • This reply was modified 5 years, 3 months ago by  Laveena.
  • Hi Achintya,

    You can start with the below code, it will not cover 100%. You have to write a couple of test methods to cover all the fields and logics.

    @isTest
    public class ControllerHelperTest
    {
    @isTest
    private static void testValidate1()
    {
    ControllerHelper ctrl = new ControllerHelper();
    Boolean isValid = false;

    Test.StartTest();

    Case case1 = new Case();
    case1.field1 = 'Yes';
    case1.field2 = 'Yes';
    case1.field3 = null;

    insert case1;

    isValid = ControllerHelper.validate(case1);

    Test.stopTest();

    System.assert(isValid, true);
    }
    }

    Thanks

  • Laveena

    Member
    August 20, 2019 at 4:47 am in reply to: How to trigger an action in LWC component in Salesforce?

    Hi Piyush,

    You can use api methods in LWC. These are exposed to parent components when decorated api. Here is an example:

    Aura component:

    cmp:

    <lightning:button label=”Get From Poc” onclick=”{!c.getFromPoc}” />
    <c:poc aura:id=”poc” />

    and its JS:

    getFromPoc : function (component, event, helper) {
        let myData = component.find("poc").getMyData();
        console.log("myData => ", myData);
    },

    Now the child LWC component POC:

    JS:

    import { LightningElement, wire, api } from 'lwc';
    export default class Poc extends LightningElement {
        @apigetMyData() {
            return 'some data from poc';
        }
    }

    This method getMyData is exposed and can be invoked from parent component (Aura or LWC). Syntax will be same as aura:method invocation as you can see in aura component getFromPocmethod.

    Thanks

  • Laveena

    Member
    August 20, 2019 at 4:37 am in reply to: How to customize the view on Manage apex classes page in Salesforce?

    Hi Piyush,

    You'd need to create a filter, use the Contains operator and you can either separate your strings by comma in one filter (effectively each comma is an 'OR') or you can add up to 10 filters and apply filter logic to separate your filters by OR instead of AND (which is the default filter logic).

    Filter logic is explained in detail here:  https://help.salesforce.com/htviewhelpdoc?id=reports_filter.htm&siteLang=en_US
    Thanks

  • Laveena

    Member
    August 19, 2019 at 1:40 pm in reply to: Can opportunities can be imported using Data Import wizard?

    Hi Somendra,

    You cannot import opportunities using data import wizard. You can use Data Import Wizard to import accounts, contacts, leads, solutions, and custom objects.

    Thanks

    • This reply was modified 5 years, 3 months ago by  Laveena.
  • Hi Yogesh,

    You can add an HTML area component that contains an iframe that loads a VisualForce page with code that generates the URL for the New action of your custom object.

    <iframe style="background:transparent; border:0; overflow:hidden" src="/apex/<Name of VisualForce page>" height="100" width="100%"></iframe>

    Change <Name of VisualForce page> to the name of the VisualForce page that contains the button:

    <apex:page showheader="false" sidebar="false" standardstylesheets="false">
    <apex:form >
    <input type="submit" value="New"
    onclick="window.top.location='{!URLFOR($Action.<Object API Name>.new)}'; return false;" />
    </apex:form>
    </apex:page>

    Change <Object API Name> to the API name of your custom object.

    Note that iframes don't grow/shrink to fit their content so you'll have to set an explicit height. The loaded content is actually served from the force.com domain, so cross-domain security stops you accessing the parent document to resize it automatically.

    Thanks

  • Laveena

    Member
    August 19, 2019 at 12:42 pm in reply to: What is the use of aura.action in sfdc?

    Hi Saddam,

    The following  pattern is a shortcut to pass a controller action from a parent component to a child component that it contains, and is used for on*handlers, such as onclick. If a child component has an Aura.Action attribute, a parent component can pass in an action handler when it instantiates the child component in its markup.

    Thanks

  • Laveena

    Member
    August 19, 2019 at 12:38 pm in reply to: What is skinny table?

    Hi Saddam,

    A skinny table is a custom table in the Force.com platform that contains a subset of fields from a standard or custom base Salesforce object. Force.com can have multiple skinny tables if needed, and maintains them and keeps them completely transparent to you.

    Skinny Table considerations:

    Skinny tables don’t include soft-deleted rows (i.e., records in the Recycle Bin with isDeleted = true)
    Automatically synchronizes the rows between the base object and the skinny table.
    To ensure optimal performance, they contain only the minimum set of fields required to fulfill specific business use cases.
    Adding a new field in skinny table, contact Salesforce support to re-create table again.
    Skinny tables don’t get copied over to sandbox organizations
    Skinny tables are custom tables in the underlying Force.com database.
    Changing any field type in main table will invalid skinny table, contact salesforce support to re-create table again.

    Thanks
     

  • Laveena

    Member
    August 16, 2019 at 5:33 am in reply to: How to get CompactSerialization() of JWS classs in Salesforce?

    Hi Achintya,

    It returns the compact serialization representation of the JWS as a concatenated string, with the encoded JWS header, encoded JWS payload, and encoded JWS signature strings separated by period ('.') characters.

    Thanks

  • Hi Saddam,

    To achieve this, follow these steps:-

    Define aura:id of the child component in parent.
    Define <aura:method> in child component and it will link to method of child controller.
    Define a lightning:button on parent component and on click of this button get the reference of the child component as mentioned in step 1 and call aura:method as mentioned in step 2.

    Thanks

  • Laveena

    Member
    August 13, 2019 at 11:17 am in reply to: How to use Relationship in Email Template in Salesforce?

    Hi Yogesh,

    Just Give the Relationship Value - {!Account.Name} only in Email Template Subject Value.

    Thanks

     

  • Laveena

    Member
    August 13, 2019 at 11:12 am in reply to: what is the difference between criteria and condition in Salesforce?

    Hi Yogesh,

    Criteria: Initial entry point which defines the start of the action to be taken. For e.g: When an Account record is created/updated... do something

    Condition: Specifics about the defined criteria which makes the action execution on very specific terms For e.g: When Shipping Zip Code on an Account is updated.. do something

    Criteria and condition are used interchangeably. I believe as of Winter '18, (almost) all of the UI reads "criteria", but if you happen to see "condition", it's the same thing. The criteria or condition of a rule is the data that must be true before the rule will be carried out.

    Thanks

  • Laveena

    Member
    August 13, 2019 at 8:24 am in reply to: What are Governor Limits in Salesforce?

    Hi Achintya,

    Governor limits are runtime limits enforced by the Apex runtime engine to ensure that code does not misbehave

    Governor limits are Salesforce’s way of forcing you to write efficient, scalable code.

    The good:

    Governor limits prevent other orgs from writing bad code and taking up all the cloud CPU.
    Coding limits in general are completely unique to Apex – consider it job security!
    You have a friend that will teach you how to dominate these limits!

    The bad:

    These are hard limits on your org preventing you, for example, from doing too many SOQL queries in a trigger (max: 100 queries).
    Upgrading your edition or paying Salesforce more money will not increase your limits! The only workaround is to understand how to navigate around them.

    For more information, please refer-

    1) Execution Governors and Limits
    https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm

    2) Apex Governor Limits
    https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm

    3) SOQL and SOSL Limits
    https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_soslsoql.htm

    4) most important Governor Limit
    http://www.sfdc99.com/2013/11/23/the-three-most-common-governor-limits-and-why-youre-getting-them/
    http://www.sfdc99.com/2013/11/17/what-are-governor-limits/
    http://www.slideshare.net/shivanathd/governor-limits

    Thanks

     

  • Laveena

    Member
    August 13, 2019 at 7:22 am in reply to: What is Data Skew in SFDC?

    Hi Saddam,

    Certain Salesforce objects, such as accounts and opportunities, have special data relationships that maintain parent and child record access under private sharing models. If too many child records are associated with same parent object in one of these relationships, this imbalance causes something called “data skew,” which in turn causes performance problems.

    Thanks.

  • Hi Prachi,

    It might help you

    Vf code-

    <apex:commandButton action=”{!Move}” value=”Next VF page”/>

    controller code:

    public PageReference Move()
    {
    PageReference Page = new PageReference(‘/apex/vfname’);
    Page.setRedirect(true);
    return Page;
    }

    Thanks

  • Hi Prachi,

    Yes, that can be possible.

    You could create Public Groups, one for record submitter and other for approvers. And in the Select Assigned Approver screen, you will assign user or queue who can approve this. Make sure, same users should not be listed in submitter and approver groups.

    Thanks

  • Laveena

    Member
    August 13, 2019 at 6:11 am in reply to: Is it possible to schedule a Dynamic Dashboard in Salesforce?

    Hi Achintya,

    In Enterprise Edition, Unlimited Edition, and Performance Edition, you can schedule dashboards to refresh daily, weekly, or monthly. You can also set up Salesforce to send an email with an HTML version of the dashboard when the refresh completes. For email applications that don’t support HTML, the email includes text and a link to the dashboard. Each dashboard has a running user, whose security settings determine which data to display in a dashboard.If the running user becomes inactive, the report is not run. The system administrator receives an email notification to either activate the user, delete the report schedule, or change the running user to an active one in the scheduled report.

    If you schedule a dashboard to refresh on a specific day of every month, it only refreshes on months that have that specific day. For example, if you schedule a refresh for the 31st of every month, the dashboard won’t refresh on 30-day months. To refresh on the last day of every month, choose “Last” from the On day of every month drop-down list.
    Dashboards won’t refresh as scheduled if the running user doesn’t have access to the dashboard folder.
    If a dashboard has filters, only the unfiltered version is refreshed.
    You can’t schedule refreshes for dynamic dashboards. They must be refreshed manual

    Thanks

  • Laveena

    Member
    August 12, 2019 at 11:45 am in reply to: Which are the types of custom settings in Salesforce?

    Hi Prachi,

    Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. All custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database. This data can then be used by formula fields, validation rules, flows, Apex, and the SOAP API.
    There are two types of custom setting:
    List Custom Settings
    Hieriarchal Custom Settings.

    Thanks

     

  • Hi Achintya,

    Lightning: and ui: are two namespaces for core lightning component. The lightning namespace components are optimized for common use cases.

    Thanks

  • Laveena

    Member
    August 12, 2019 at 8:18 am in reply to: Recordtype Query

    Hi Prachi,

    Here is the code you can refer
    for example :
    let say we have two Contact Record Types PrimaryContact and BusinessContact.
    Now  we can create Contact record by using these recordtype  such as PrimaryContact  or BusinessContact .
    There are two different approach:

    First Approch
    We normally query like this .

    RecordType rt = [SELECT id,Name
    FROM RecordType
    WHERE SobjectType='Contact ' AND Name='PrimaryContact '];
    And now use this value further while creating the Contact Record.

    Contact con = new Contact (Name='TestConatct' , recordTypeId=rt.id);
    INSERT con;

    Second Approach
    We can do this in other way without query.

    Schema.DescribeSObjectResult cfrSchema = Schema.SObjectType.Contact;
    Map<String,Schema.RecordTypeInfo> ContactRecordTypeInfo
    = cfrSchema.getRecordTypeInfosByName();
    Now to get the recordTypeId we will have to use a method getRecordTypeId.

    Id rtId = ContactRecordTypeInfo.get('PrimaryContact ').getRecordTypeId(),
    Now we can insert Contact Record like

    Contact con = new Contact (Name='TestConatct',recordtypeid = rtId );
    INSERT con;

    Thanks

  • Laveena

    Member
    August 9, 2019 at 11:43 am in reply to: What is the use of @InvocableMethod in Salesforce?

    Hi Saddam,

    While the Process builder is very flexible out of the box, there are a few business use cases those are not achievable using it. For example

    1. It doesn’t support outbound messages
    2. It doesn’t support creation of multiple records
    3. It doesn’t allow us to delete a record

    When no other process action can get the job done, add customized functionality to your Salesforce processes by calling an Apex method. To call an Apex method, add the Call Apex action to your process and select an Apex class with an @invocable method Annotation. It means they allow us to extend the Process Builder by writing Apex code that meets certain criteria, and then invoking the Apex from our Processes. If the class contains one or more invocable variables, manually enter values or reference field values from a related record. @InvocableMethod Annotation support bulk operations.

    Thanks

  • Laveena

    Member
    August 9, 2019 at 11:32 am in reply to: What is the use of force:hasRecordId interface in Salesforce?

    Hi Achintya,

    Add the force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record.
    The recordId attribute is set only when you place or invoke the component in a context of a record. For example, when you place the component on a record page, or invoke it as an action from a record page or object home. In all other cases, such as when you create this component programmatically inside another component, recordId isn’t set, and your component shouldn’t depend on it.

    Thanks

  • Laveena

    Member
    August 9, 2019 at 11:25 am in reply to: What is the use of testSetup in Salesforce?

    Hi Saddam,

    Test setup methods are defined in a test class, take no arguments, and return no value.

    If a test class contains a test setup method, the testing framework executes the test setup method first, before any test method in the class. Records that are created in a test setup method are available to all test methods in the test class and are rolled back at the end of test class execution. If a test method changes those records, such as record field updates or record deletions, those changes are rolled back after each test method finishes execution. The next executing test method gets access to the original unmodified state of those records.

    Test setup methods are supported only with the default data isolation mode for a test class. If the test class or a test method has access to organization data by using the @isTest(SeeAllData=true) annotation, test setup methods aren’t supported in this class. Because data isolation for tests is available for API versions 24.0 and later, test setup methods are also available for those versions only.

    Thanks

    • This reply was modified 5 years, 3 months ago by  Laveena.
  • Hi Achintya,

    In Lightning Component Framework, the communication between two components accomplished is supported in several ways:
    1. Attributes or Methods to pass data down the component hierarchy.
    2. Lightning Events to pass data up and around in the component hierarchy.

    Thanks

Page 5 of 6