Forum Replies Created

Page 2 of 7
  • Hi Saurabh,

    No you can't change the field type of Formula field as it depends on other fields

  • Suraj

    Member
    May 10, 2017 at 1:23 pm in reply to: What are analytical snapshot in salesforce?

    Hi Saurabh,

    An analytic snapshot letsyou report on historical data. Authorized users can save tabular orsummary report results to fields on a custom object, then map thosefields to corresponding fields on a target object. They can then schedulewhen to run the report to load the custom object's fields with thereport's data. Analytic snapshots enable you to work with report data similarly to how you workwith other records in Salesforce.

  • Hi Manpreet,

    apex:inputText: An HTML input element of type text. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object.

    This component doesn't use Salesforce styling. Also, since it doesn't correspond to a field or any other data on an object, custom code is required to use the value the user enters.

    apex:inputField: An HTML input element for a value that corresponds to a field on a Salesforce object. The <apex:inputField> component respects the attributes of the associated field, including whether the field is required or unique, and the user interface widget to display to get input from the user. For example, if the specified <apex:inputField> component is a date field, a calendar input widget is displayed. When used in an <apex:pageBlockSection>, <apex:inputField> tags automatically display with their corresponding output label.

  • Hi Manpreet,

    Whenever we enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update of a workflow rule, due to this field update other workflow rules on the same object will be fired if the entry criteria of those workflow rules satisfied.

    Incase, in other workflow rules also if we enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update recursive workflow rules will come in some scenarios.

    We can take two steps to avoid recursive workflow rules -

    For the workflow Evaluation Criteria if you choose created, and any time it’s edited to subsequently meet criteria option, we can avoid recursive workflow rules.
    If you don't enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update of a workflow rule we can avoid.

  • Suraj

    Member
    May 9, 2017 at 12:52 pm in reply to: Which component in Salesforce ends with __mdt and __s ?

    Hi Saurabh,

    __mdt is used for custom metadata Type and __s is used for geolocation service type.

  • Hi Saurabh,

    Process.Plugin is a built-in interface that allows you to process data within your organization and pass it to a specified flow. The interface exposes Apex as a service, which accepts input values and returns output back to the flow.

  • Suraj

    Member
    May 9, 2017 at 12:28 pm in reply to: What is the use commandLink in salesforce?

    Hi Saurabh,

    A link that executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action. An <apex:commandLink> component must always be a child of an <apex:form> component.

  • Suraj

    Member
    May 8, 2017 at 2:09 pm in reply to: System.LimitException: DML currently not allowed?

    Hi Manpreet,

    You might be calling DML in the Constructor or in the Getter ANd Setter.

    You can't execute DML in the Constructor (or call a method that executes DML from a Constructor) and you can't execute DML in Getter and Setter Methods.

  • Suraj

    Member
    May 8, 2017 at 12:58 pm in reply to: What is custom metadata type in salesforce?

    Hi Saurabh,

    Custom metadata is customizable, deployable, packageable, and upgradeable application metadata. First, you create a custom metadata type, which defines the form of the application metadata. Then you build reusable functionality that determines the behavior based on metadata of that type. Similar to a custom object or custom setting, a custom metadata type has a list of custom fields that represent aspects of the metadata.

    Custom metadata types support the following custom field types

    • Metadata Relationship
    • Checkbox
    • Date
    • Date and Time
    • Email
    • Number
    • Percent
    • Phone
    • Picklist
    • Text
    • Text Area
    • URL
  • Hi Manpreet,

    When we undelete the deleted Junction Object all the Master Detail Relationship Data type will be changed to Lookup Relationship DataType.

  • Hi Manpreet,

    Add java script file in Static Resource setup -> develop -> Static Resources -> click on ‘New’ -> Name: filename and add file from local desktop and save.

    We can use that file as follows in Visual Force page

    <apex: includescript values=” {! $Resource.fileName}”/>

  • Hi Manpreet,

    Apex-lang is about as close to a Java-style library as you can get. Contains several string, database, and collection utilities that mimmick Java functionality. Be aware though, some stuff including Comparing and Sorting collections is out of date with the advent of the Comparable interface in Apex.

    In addition to apex-lang, and like you suggest, I typically create or reuse static helper methods throughout my projects. Static helper methods are very convenient for reusing code in Chatter functionality, DML handling, Exception handling, Unit testing, etc.

  • Hi Manpreet,

    You can create sObjects in memory with arbitrary CreatedDate values by using JSON.deserialize. This doesn’t enforce the normal read-only field attributes that prevent you from setting a createdDate value. However you can’t commit arbitrary CreatedDate values to the database (or else it would be a serious security issue).

    An example of doing so :

    String caseJSON = ‘{“attributes”:{“type”:”Case”,”url”:”/services/data/v25.0/sobjects/Case/500E0000002nH2fIAE”},

    “Id”:”500E0000002nH2fIAE”,

    “CreatedDate”:”2012-10-04T17:54:26.000+0000″}’;
    Case c = (Case) JSON.deserialize(caseJSON, Case.class );
    System.debug(c.createdDate);

  • Suraj

    Member
    April 28, 2017 at 2:01 pm in reply to: Salesforce Data loader Login Error "Parser Was Expecting Element" ?

    Hi Manpreet,

    In order to avoid "Parser was expecting element" error in data loader, kindly check the following settings in Apex Data Loader

    •  Check whether you have given the proxy correctly.
    • Check whether you have given the port number correctly.
    • Check whether you have given the correct url(for Production - https://login.salesforce.com and for Sandbox - https://test.salesforce.com).
    • Make sure "API Enabled" permission is checked on the Profile.
  • Hi Manpreet,

    The Recycle Bin link in the sidebar lets you view and restore recently deleted records for 15 days before they are permanently deleted. Your Recycle Bin record limit is 25 times the Megabytes (MBs) in your storage. For example, if your organization has 1 GB of storage then your limit is 25 times 1000 MB or 25,000 records. If your organization reaches its Recycle Bin limit, Salesforce automatically removes the oldest records if they have been in the Recycle Bin for at least two hours.

  • Suraj

    Member
    April 28, 2017 at 1:29 pm in reply to: What is the purpose or use of @TestVisible in salesforce?

    Hi Saurabh,

    TestVisible annotation is used to allow test methods to access private or protected members of another class outside the test class.With this annotation, you don’t have to change the access modifiers of your methods and member variables to public if you want to access them in a test method. For example, if a private member variable isn’t supposed to be exposed to external classes but it should be accessible by a test method, you can add the TestVisible annotation to the variable definition

  • Suraj

    Member
    April 28, 2017 at 1:27 pm in reply to: What are various standard exceptions that salesforce throws?

    Hi Saurabh,

    There are number of Exception,

    • AsyncException

    Any problem with an asynchronous operation, such as failing to enqueue an asynchronous call.

    • CalloutException

    Any problem with a Web service operation, such as failing to make a callout to an external system.

    • DmlException

    Any problem with a DML statement, such as an insert statement missing a required field on a record.

    • JSONException

    Any problem with JSON serialization and deserialization operations.

    For full list of Exception use this link

  • Hi Saurabh,

    You can try this,

    public class ControllerClassName
    {
    public List<String> strList { get;set; }
    public void autoRun()
    {
    Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get('Account').getDescribe().fields.getMap();
    strList = new List<String>(objectFields.keySet());
    }
    }

  • Suraj

    Member
    April 27, 2017 at 10:06 am in reply to: What is the default date time format of Salesforce?

    Hi Saurabh,

    • DateTime: Salesforce stores all DateTimes in Coordinated Universal Time (UTC) format. Remember that dateTime field values are stored as Coordinated Universal Time (UTC). When one of these values is returned in the Salesforce application, it is automatically adjusted for the timezone specified in your organisation preferences. Your application may need to handle this.
    • Date: fields contain no time information and completely ignore timezones. Whatever date you specify when you set it will be the date every user sees, with any time and zone information being ignored.
  • Suraj

    Member
    April 27, 2017 at 10:04 am in reply to: What are the Best Practises for Improving Visualforce Performance ?

    Hi Saurabh,

    There are many factors that affect the visualforce Performance:

    • Load Times
    1. Avoid SOQL queries in your Apex controller getter methods.
    2. Reduce the number of records displayed on a page
    3. In all cases, Visualforce pages must be under 15 MB
    • Multiple Concurrent Requests
    1. Increase the time interval for calling Apex from your Visualforce page.
    2. Move non-essential logic to an asynchronous code block using Ajax.

    For more details use this link

  • Hi Saurabh,

    You need to write Either Trigger on child object to count the number of child record in lookup Relationship Or You can also Inline Editing.

  • Suraj

    Member
    April 27, 2017 at 6:22 am in reply to: How you can use Datetime field as a criteria in SOQL Query?

    Hi Saurabh,

    We cannot use Datetime as condition in Where Clause in between single Quotes.

    You can do something like this ,

    WHERE CreatedDate > 2005-10-08T00:00:00Z

    Or, you can also use Date Literals like

    WHERE CreatedDate > YESTERDAY

  • Suraj

    Member
    April 26, 2017 at 1:17 pm in reply to: What are the different AJAX action tags in vf page?

    Hi Saurabh,

    This tags support for calling action and refresh the field only not visualforce page.

    • apex:actionFunction-
      Provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An <apex:actionFunction> component must be a child of an <apex:form> component.
    • apex:actionPoller
      A timer that sends an AJAX update request to the server according to a time interval that you specify. Update request can then result in a full or partial page update. You should avoid using this component with enhanced lists.
    • apex:actionRegion
      This action tag is use AJAX request for particular field or component. Like we have change the value of pick list in visual force then request go to Server and come back through AJAX without Saving the VF page.
    • apex:actionStatus
      A component that displays the status of an AJAX update request. An AJAX request can either be in progress or complete
    • apex:actionSupport
      Adds AJAX support to another component, allowing the component to be refreshed asynchronously by server when a particular event occurs, such as a button click or mouse over.
  • Suraj

    Member
    April 26, 2017 at 12:49 pm in reply to: what field are indexed by default in salesforce?

    Hi Saurabh,

    the easiest way to see which fields on a given object are indexed is to check for a "check" in the "Indexed" column in the list of an object's fields in Setup:

    download

  • Suraj

    Member
    April 26, 2017 at 11:39 am in reply to: Can we generate the random string or random password using Apex?

    Hi Saurabh,

    You can use this:

    Integer len = 10;
    Blob blobKey = crypto.generateAesKey(128);
    String key = EncodingUtil.convertToHex(blobKey);
    String pwd = key.substring(0,len);

Page 2 of 7