Forum Replies Created

Page 4 of 5
  • Saddam

    Member
    September 4, 2019 at 6:37 am in reply to: Salesforce Basic - Related to Data Model

    Hi

    When referring to data model, we are discussing the architectural structure of the way data is stored in an application.

    Salesforce.com and the Force.com platform come with a standard data model and allow you to customize that data model for the purposes of custom functionality.

    Ironically, the standard data model is accessed and configured in your org under the "customize" menu of your org setup. For instance, if you were to add a custom picklist value to the account type field, you are configuring the standard data model. You can also add to the standard data model by adding custom fields on a standard object like Account.

    Custom data model is in the "Create" menu. This is where you would add a custom object (let's say Invoice) to your org. Here you are creating a new place to put data that didn't exist before.

    The reason we use the term "data model" in the first place is to make a distinction between where we put data (the data model), how we view data (user interface), and how data is acted upon (business logic).

    Salesforce org configuration blurs these lines a bit, because whenever you add to the data model by creating a new object, we also automatically give you a user interface (page layout) and business logic (the ability to save, delete, etc.).

    These three components, data model, user interface, and business logic are also components in the underlying architecture that salesforce uses which is referred to as Model-View-Controller (MVC).

    Model: Data Model
    View: User Interface
    Controller: Business Logic

  • Hi Deepak,

    A lightning:treeGrid component displays hierarchical data in a table. Its appearance resembles lightning:datatable, with the exception that each row can be expanded to reveal a nested group of items. Rows that contain nested data display a chevron icon to denote that they can be expanded or collapsed. This visual representation is useful for displaying structured data such as account hierarchy or forecasting data. Each column can be displayed based on the data type. For example, a phone number is displayed as a hyperlink with the tel: URL scheme by specifying the phone type.

  • Saddam

    Member
    September 3, 2019 at 11:21 am in reply to: Lighting

    Hi Yogesh,

    No, you can't directly call helper.js from component.cmp

  • Saddam

    Member
    September 3, 2019 at 11:17 am in reply to: What is the difference between __c and __r in salesforce ?

    Hi Nikita,

    __c is for Custom objects For example: Custom_Object__c . It is used for reference custom object in Apex or visualforce page, formula field etc internally. Used as suffix.

    __r is for Custom objects reference For example: Custom_Object__r . It is used for reference custom object relationship name in Apex or visualforce page, formula field etc. Used as suffix.

  • Saddam

    Member
    September 3, 2019 at 11:15 am in reply to: How can I schedule a job after every 15 minutes in Salesforce?

    Hi Laveena,

    You can use this corn expression

    System.schedule('Schedule job 00', '0 0 * ?', new NameOfScheduleClass());

    System.schedule('Schedule job 15', '0 15 * ?' , new NameOfScheduleClass());

    System.schedule('Schedule job 30', '0 30 * ?', new NameOfScheduleClass());

  • Hi Deepak,

    Everything needs to be uploaded to the Standard (Master) Price Book first, this is where the Product ID's are created.
    Then after you set up each Product with a Standard/List price you can create a Price Book Entry for each of the Product(s) you want to add to the specific custom Price Book(s)

  • Hi Deepak,

    In lightning component, javaScript is client-side and apex class is server-side.

  • Hi Deepak,

    To reference a JavaScript library that you’ve uploaded as a static resource, use a <ltng:require> tag in your .cmp or .app markup.

    <ltng:require scripts=”{!$Resource.***resourceName***}”
    afterScriptsLoaded=”{!c.afterScriptsLoaded}” />

  • Saddam

    Member
    August 29, 2019 at 6:22 am in reply to: How to use a lightning component in a visualforce page in salesorce ?

    Hi Hariom,

    First of all, you need to extends="ltng:outApp" in your lightning app,

    after that you can follow this step:

    1.Add the <apex:includeLightning /> component to your Visualforce page.
    2. Reference a Lightning app that declares your component dependencies with $Lightning.use().
    3. Write a function that creates the component on the visualforce page with $Lightning.createComponent().

  • Hi Nikita,

    $A.getCallback(), it returns a function that closures the current access context. You then need to execute that function.

  • Hi Achintya,

    Recordsetvar is used to retun the List of sObject records.

  • Hi Deepak,

    Visualforce Page

    Visualforce components are page-centric
    Most of the work is done on the server.
    JavaScript buttons and links are supported
    There are three steps to add Lightning components to a Visualforce page:
    Add <apex:includeLightning/> at the beginning of your page.
    Create and reference a Lightning app that declares your component dependencies.
    Write a JavaScript function that creates the component on the page using $Lightning.createComponent()
    In Salesforce Classic, Visualforce “owns” the page, the request, the environment. Visualforce is the application container
    Primarily for Desktop
    Based on MVC framework
    My domain is not required
    Server sends the resulting HTML to the browser

    Lightning Components:

    Lightning Components are client-side centric
    It's on the client-side which makes them more dynamic and mobile-friendly.
    JavaScript buttons and links aren’t supported.
    Add an iframe to the Lightning Component and set the source url of the iframe to the Visualforce Page.
    In Lightning Experience, Visualforce runs inside an iframe that’s wrapped inside the larger Lightning Experience container.
    "Mobile First" concept of design.
    It is a component-based framework.
    My domain is required to use Lightning Components.
    The application/component bundle is sent to the client, then the browser generates the UI by loading the bundle using Javascript libraries.

  • Saddam

    Member
    August 28, 2019 at 6:52 am in reply to: List out different methods of ProjectionNode class in Salesforce?

    Hi Laveena,

    The following are methods for ProjectionNode.
    sum()
    Returns the sum of a numeric field.
    avg()
    Returns the average value of a numeric field.
    min()
    Returns the minimum value of a field.
    max()
    Returns the maximum value of a field.
    count()
    Returns the number of rows that match the query criteria.
    unique()
    Returns the count of unique values.
    alias(name)
    Define output column names.

  • Saddam

    Member
    August 28, 2019 at 6:40 am in reply to: What is approval process in salesforce?

    Hi Prachi,

    Salesforce approval process is an automated process and your organization can use to approve records in Salesforce, An approval process is a combination of steps for a record to be approved and a person has to approve it each step.A step can apply to all the records to that object or just record that meets the certain criteria. An approval process also specifies the actions to take when a record is approved, rejected, recalled, or first submitted for approval.

    Simple or multi-step approval processes to automate and enforce the approval of virtually anything in your company.

    Navigate setup -> Create -> Workflow & Approvals -> Approval Processes.
    Select Object for the new approval process.
    Click on  Create New Approval Process and choose Use Standard Setup Wizard from the drop-down button.

  • Hi Nikita,

    Only up to two master-detail relationships are allowed for an object.
    You can have only Up to three levels of custom detail levels.
    We can’t create a Master-detail relationship when the custom object already contains data.
    Each object is allowed to have one or two masters of up to 8 details.

  • Saddam

    Member
    August 27, 2019 at 6:13 am in reply to: What is lightning event in Salesforce?

    Hi Deepak,

    here are two types of events: Application Events and Component Events.

    Application events should be used sparingly because they go to all components and (even if only a few components actually handle the event) that can slow things down. An example where I have used them is in a customer community where each page was to be viewed in the context of a particular Account. I put an Account switcher component in the header part of the page, then fired an Application event when the Account changed. This allowed all components on the page to change context and show information specific to that Account.

    Component events are for a child component to communicate with its parent (that is, the child is contained inside the parent). An example of this is found in the standard components themselves e.g. ui:menuList fires a ui:menuSelect event when the menu is clicked. If you put a ui:menuList in your custom component, you can handle that event coming up from the child, and take some appropriate action.

    The other inter-component communication mechanism is via attributes. A parent can communicate with its children by changing the values of their attributes.

  • Saddam

    Member
    August 27, 2019 at 6:08 am in reply to: How many fields we can create for a particular Salesforce object ?

    Hi Nikita,

    you can create 500 fields per object but best practice is to create less than 50 fields per object.

  • Saddam

    Member
    August 26, 2019 at 7:58 am in reply to: Is it possible to schedule an apex class?

    Hi Deepak,

    It is also possible to schedule an Apex class from the user interface by executing below steps:

    1. Navigate to Setup, search for Apex in the Quick Find box, then select Apex Classes.
    2. Click Schedule Apex.
    3. Enter the job name, Example – Daily Account Update.
    4. Click the lookup button to search Apex class and select the class.
    5. Select Weekly or Monthly for the frequency and set options as needed.
    6. Select the start and end dates, and also the preferred start time.
    7. Click Save.

  • Hi Deepak,

    future method

    A future method runs in the background, asynchronously. You can call a future method for executing long-running operations, such as callouts to external Web services or any operation you'd like to run in its own thread, on its own time.

    Remember that any method using the future annotation requires special consideration because the method does not necessarily execute in the same order it is called.
    The system executes the asynchronous call when it has available resources – this means that you can’t assume anything about when the call will be executed.
    The asynchronous method executes in a different transaction context than the trigger. A failure of the callout will have no effect on the transaction controlling the trigger (i.e. changes will not be rolled back). You will have to build in suitable compensation logic yourself to account for any exceptions in the callout.
    Future methods won’t necessarily execute in the same order they are called. In addition, it’s possible that two future methods could run concurrently, which could result in record locking if the two methods were updating the same record.
    No more than 50 method calls per Apex invocation
    The maximum number of future method invocations per a 24-hour period is 250,000 or the number of user licenses in your organization multiplied by 200, whichever is greater
    Keep the governor limits in mind when making callouts. We are constrained by the interface provided by the remote web service. If the remote web service were to provide any kind of batch processing interface, choose that instead of making individual calls. It helps avoid hitting the governor limits and will be more performant as well since there are fewer round trips to make.
    Methods with the future annotation cannot be used in Visualforce controllers in either getMethodName or setMethodName methods, nor in the constructor.
    @future(callout = true) means that the method has ability to invoke external web services.
    Methods with the future annotation must be static methods
    can only return a void type
    The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types
    Methods with the future annotation cannot take sObjects or objects as arguments.
    You can invoke future methods the same way you invoke any other method. However, a future method can’t invoke another future method
    Methods declared as future aren't allowed in classes that implement theDatabase.Batchable interface.
    Methods declared as future can't be called from a batch Apex class.
    The getContent and getContentAsPDFPageReference methods cannot be used in methods with the future annotation
    Asynchronous calls, such as @future or executeBatch, called in a startTest, stopTest block, do not count against your limits for the number of queued jobs
    To test methods defined with the future annotation, call the class containing the method in a startTest(), stopTest() code block. All asynchronous calls made after the startTest method are collected by the system. When stopTest is executed, all asynchronous processes are run synchronously.

    Queueable Apex

    Non-primitive types: Queueable class can contain member variables of non-primitive data types, such as sObjects or custom Apex types. Those objects can be accessed when the job executes.
    Monitoring: When you submit your job by invoking the System.enqueueJob method, the method returns the ID of the AsyncApexJob record. You can use this ID to identify your job and monitor its progress, either through the Salesforce user interface in the Apex Jobs page, or programmatically by querying your record from AsyncApexJob.
    Chaining jobs: You can chain one job to another job by starting a second job from a running job. Chaining jobs is useful if you need to do some sequential processing.

  • Saddam

    Member
    August 26, 2019 at 7:50 am in reply to: How to explain exception handling in Salesforce?

    Hi Sirichandan,

    Exception (fault) is an abnormal event that occurs generally after the execution of a program. It affects the normal program flow.
    →It is run time error through which execution is stopped
    → Another name for run time error is exception error, there are two types of errors

    Syntax error (or) Compile time
    Runtime error (or) exception
    → A compile-time (syntax) error occurs whenever we violate the syntax of the language
    → The only way to overcome this scenario is by changing the source code
    → In case of run time error, this might occur not due to programming error but because of run time
    → Environment such as

    Improper limits
    Lack of resources // insufficient memory
    Lack of connectivity
    → Such errors also stop the execution
    → In order to overcome run time errors and to continue with the execution of the programming language a mechanism is provided known as exception handling

  • Saddam

    Member
    August 23, 2019 at 10:58 am in reply to: What is an audit trail in salesforce?

    Hi Laveena

    The Setup Audit Trial is on the Organization level, Field History Tracking is on the Object level. The setup audit trail history helps you track the recent setup changes that you and other administrators have made to your organization. This can be especially useful in organizations with multiple administrators.

  • Saddam

    Member
    August 23, 2019 at 10:53 am in reply to: What is lightning:accordion?

    Hi Deepak,

    Lightning: accordion component groups related content in a single container. Only one accordion section is expanded at a time by default. When you select a section, it's expanded or collapsed. Set allowMultipleSectionsOpen to allow more than one section to be opened. Each section can hold one or more Lightning components.

    This component inherits styling from accordion in the Lightning Design System.

    To additionally style this component, use the Lightning Design System helper classes.

    This example creates a basic accordion with three sections, where section B is expanded by default.

    <aura:component>
    <lightning:accordion activeSectionName="B">
    <lightning:accordionSection name="A" label="Accordion Title A">This is the content area for section A</lightning:accordionSection>
    <lightning:accordionSection name="B" label="Accordion Title B">This is the content area for section B</lightning:accordionSection>
    <lightning:accordionSection name="C" label="Accordion Title C">This is the content area for section C</lightning:accordionSection>
    </lightning:accordion>
    </aura:component>

  • Saddam

    Member
    August 23, 2019 at 10:50 am in reply to: What is the use of Bucket Field in Salesforce Report ?

    Hi Nikita,

    Bucket field in Reports in Salesforce is used to group values to the name we specify.

    It can group only the below data types fields

    1. Picklist
    2. Number
    3. Text

  • Hi Nikita,

    ORDER BY Clause is used to retrieve the data in  “Ascending” or “Descending” order by the condition given in SOQL Statement.

    In salesforce ORDER BY clause are two types. They are

    ASC.
    DESC.
    Here ASC means ascending and DESC means descending order. In SOQL by default the data will be retrieved in ascending order only.

    SELECT name, Amount FROM opportunity ORDER BY name ASC.

    SOQL ORDER BY CLAUSE DESC.
    SELECT name, Amount FROM Opportunity ORDER BY name DESC

  • Hi Hariom,

    Use static resource in Visualforce – Salesforce
    Force.com platform provides us a facility to upload, manage and use the content that is static (not changing) for your organization, and it can be stored under “Static Resources“. It can be a Javascript file, CSS file, an image or even a zip file containing all the files required in one zip file. Today we’ll see how to use static resource in Visualforce – Salesforce.

    Use a static resource to display an image on a visualforce page
    In example we will cover, how to use a static resource to display an image on a visualforce page.

    Below are the ways to use the static resources in our visualforce pages:

    Suppose there is a single file like any single image or standalone css file, that you need to refer in your VF page, then you can directly use the “$Resource.resourceName” to refer the static resource where ‘$Resource‘ is a global variable to use any static resource within visualforce page. You need not to hard code the path of the static resource in VF page code. Below are some examples of the same.

Page 4 of 5