Forum Replies Created

Page 3 of 7
  • Hi Manpreet,

    Lookup record will return only first matching record where as Fast Look will return all matching record.

  • Hi Saurabh,

    apex:PageMessages is a containing component where any messages that have been added to the page will appear.

    apex:pageMessage is a component that adds a single message to the page.

    apex:message allows you to associate a message with a component.

    For more info use this link.

  • Suraj

    Member
    April 25, 2017 at 1:25 pm in reply to: Difference between with sharing and without sharing in salesforce?

    Hi Saurabh,

    We use with sharing and without sharing on a class to specify whether or not to enforce sharing rules.

    The with sharing keyword allows you to specify that the sharing rules for the current user be taken into account for a class.

    Use the without sharing keywords when declaring a class to ensure that the sharing rules for the current user are not enforced

  • Suraj

    Member
    April 25, 2017 at 1:11 pm in reply to: What is Database.AllowsCallouts in Salesforce?

    Hi Saurabh,

    It is used to allow Callouts in batch Apex, "Callouts include HTTP requests as well as methods defined with the webService keyword". Syntax is:

    global class SearchAndReplace implements Database.Batchable<sObject>,Database.AllowsCallouts{
    }

  • Suraj

    Member
    April 25, 2017 at 1:06 pm in reply to: Embed a Visualflow in a Visualforce page?

    Hi Manpreet,

    Yes,You can,To add a flow to a Visualforce page, embed it using the <flow:interview> component.

    <apex:page>
    <flow:interview name="MyUniqueFlowName"/>
    </apex:page>

  • Hi Saurabh,

    You can use apex:outputText

    Example : Format the number into currency.
    <apex:outputtext value="{0, number, 000,000.00}">
    <apex:param value="{!valFromController}" />
    </apex:outputtext>

     

  • Hi Saurabh,

    The row limit for apex:dataTable and apex:pageBlockTable in salesforce is 1000.

  • Hi Saurabh,

    Sharing setting is applied on standard object/extension by default. In case we don’t want to apply sharing setting in our code then Custom controller is only option.
    It is possible that the functionality of page does not required any Standard object or may require more than one standard object, then in that case Custom controller is required.

  • Hi Saurabh,

    External ID:This is a field that usually references an ID from another (external) system.For instance, if the customer has an Oracle Financials system that they will be linking with Salesforce, it may be easier for them to be able to refer to the Oracle ID of account records from within Salesforce. So they would create an external ID in Salesforce and they would load the Oracle ID into that field for each account. They can then refer to that ID field, rather than the Salesforce id.

    Unique ID: This is a setting for the field that will prevent you from using the same value in multiple records for the unique field. So if I create a 5 character text field and make it unique, and I create a record with the value "12345" I will not be able to create another record with that same value in the unique field. If I try to do so, I will get an error saying that the value is already in use.

  • Suraj

    Member
    April 24, 2017 at 12:37 pm in reply to: Can we write sosl in triggers in salesforce?

    Hi Saurabh,

    Yes, you can write SOSL inside triggers.There is no such restriction.

    You can test using the following Code in your Org.
    trigger trg_AccountSOSL on Account (before insert, before update) {
    List<List<SObject>> searchList = [FIND 'map*' IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead];
    List<account> myAcc = ((List<Account>)searchList[0]);
    system.debug(myAcc[0].name);
    }

  • Suraj

    Member
    April 21, 2017 at 2:13 pm in reply to: What is Trigger.old and when do you normally use it?

    Hi Manpreet,

    Trigger.old returns a list of the old versions of the sObject records. Note that this sObject list is only available in update and delete triggers(before update and before delete).

  • Suraj

    Member
    April 21, 2017 at 1:58 pm in reply to: What are the different tools that can be used when deploying code ?

    Hi Manpreet,

    The Different Tool for Deploying Code are

    • Change Sets

    Straight sandbox to production migrations

    • Force.com Migration Tool

    Development projects for which you need to populate a test environment with a lot of setup changes—Making these changes using a web interface can take a long time.

  • Hi Manpreet,

    It's best Practice to have one trigger per object,If you assign more than one trigger per object then the order of execution of Triggers on object is not defined,you can't predict which trigger will run first therefore required result will not be achieved.

  • Suraj

    Member
    April 21, 2017 at 1:47 pm in reply to: What are the advantages of using Batch Apex instead of a trigger?

    Hi Manpreet,

    A Batch class allows you to define a single job that can be broken up into manageable chunks that will be processed separately.

    If you have 10,001 Account records in your org, this is impossible without some way of breaking it up.

  • Hi Saurabh,

    As per the Salesforce Documentation Profile is Mandatory but role is optional

    So,you can't create a user without profile but you can create without role.

  • Suraj

    Member
    April 20, 2017 at 1:58 pm in reply to: What are the types of custom settings in Salesforce?

    Hi Manpreet,

    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.

    Custom Setting enables efficient access without the cost of repeated queries to the database. This data can then be used by formula fields, validation rules, Apex, and the Web services API. Custom Setting are of 2 types Hierarchy Custom Settings and List Custom Setting.

  • Hi Manpreet,

    Minimum 75% of total classes and triggers coverage is Required to deploy package in production,it does not matter trigger is included or not.

    Overall coverage > 75%

  • Hi Saurabh,

    As per the Salesforce Documentation the purpose of using the different domain is to leverage the browser security model (same domain policy) to protect our customers and the salesforce.com service from cross site scripting and cross site request forgery attacks.

    Moving to the serving pages from separate domains is a critical component of our ongoing commitment to insure the highest level of security and availability for everyone.

  • Suraj

    Member
    April 20, 2017 at 1:21 pm in reply to: What are login hour and login ip ranges in salesforce?

    Hi Saurabh,

    Login Hours Sets the hours when users with a particular profile can use the system.

    Login Ip Ranges Sets the IP addresses from which users with a particular profile can log in.

  • Suraj

    Member
    April 20, 2017 at 1:04 pm in reply to: How can we embed a Visualflow in a Salesforce Visualforce page?

    Hi Saurabh,

    You can follow these steps:

    • From Setup, enter Flows in the Quick Find box, then select Flows.
    • Click the name of the flow.
    • Copy the unique name of the flow.
    • From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages.
    • Add the <flow:interview> component somewhere between the <apex:page> tags.
    • Set the name attribute to the unique name of the flow.
    • Click Save.
    • Restrict which users can access the Visualforce page.
    • Click Visualforce Pages.
    • Click Security next to your Visualforce page.
    • Move all the appropriate profiles from Available Profiles to Enabled Profiles by using the add and remove buttons.
    • Click Save.
    • Add the Visualforce page to your Force.com app by using a custom button, link, or Visualforce tab.
  • Suraj

    Member
    April 19, 2017 at 2:11 pm in reply to: What is WhoId and WhatId in Salesforce activities?

    Hi Manpreet,

    WhoID refers to people. Typically: contacts or leads. Example: LeadID, ContactID

    WhatID refers to objects. Example: AccountID, OpportunityID

  • Hi Manpreet,

    In a Data Loader .CSV, if there is a comma in field content, you will have to enclose the contents within double quotation marks: ” “

  • Suraj

    Member
    April 18, 2017 at 2:12 pm in reply to: How can you call a controller method from JavaScript in salesforce?

    Hi Saurabh,

    You need to use apex:actionFunction within vf page and define "action" attribute to Function to call. For e.g

    <apex:actionFunction action="{!login}" name="login"/>

    here action="{!login}" is my function name to call and within javascript call name attribute within actionfunction according to your condition.

    hope this will help you.

  • Suraj

    Member
    April 18, 2017 at 2:05 pm in reply to: What is the advantage of using custom settings in salesforce?

    Hi Saurabh,

    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.
    To Know more,Use this link

  • Suraj

    Member
    April 18, 2017 at 1:58 pm in reply to: How can you expose an Apex class as a REST WebService in Salesforce?

    Hi Manpreet,

    Apex class and methods can be exposed for external applications access and your application through the REST architecture. Use @RestResource annotation with Apex class to expose it as a REST resource.

     

    • This reply was modified 7 years, 7 months ago by  Suraj.
Page 3 of 7