Forum Replies Created

Viewing 1 - 25 of 110 posts
  • Piyush

    January 22, 2018 at 7:37 am

    Hi Manpreet,

    No, you can't use functions from the formula language in custom URL button . If you want, you can make a formula field of type URL and have the button emit that field. Then your formula logic would be in the field.

    Hope this will help you...

  • Piyush

    January 22, 2018 at 7:32 am

    Hi Manpreet,

    Create a new Custom Picklist Field for Events and/or Tasks

    1. From Setup, go to Customize > Activities > Activity Custom Fields.
    2. Create a Custom Picklist called “Event Subject".
    3. Populate the picklist with the preset phrases you want to use for the "Subject" field.

    Note: No need to add this new field to existing Page Layouts.

    Add the new Custom Picklist to the Publisher Action Layout

    1. From Setup, go to Create > Global Actions > Global Actions.
    2. Next to the “New Event” action, click Layout.
    3. Remove the existing "Subject" field from the layout and replace it with your new “Event Subject” field.
    4. Once this is saved you can check the "Publisher Action" button on your device and see your new picklist.
      Build a Workflow Rule

    To copy the value from our Custom Picklist to the built-in Subject field:

    • From Setup, go to Create > Workflow & Approvals > Workflow Rules.
    • Create a new Rule:

    Step 1: Object = Event
    Step 2: Rule Name = Copy Event Subject
    Evaluate the rule when a record is = Created
    Run this rule if the following = criteria are met
    Field = Event: Subject
    Operator = equals
    Value = (leave this area blank)
    Step 3: Add Workflow Action “New Field Update”
    Name = CopyEventSubject
    Field to Update = Standard field: Subject
    Use a formula to set the new value
    Formula Value (Text) = TEXT ( Event_Subject__c )
    Note: the value inside the parentheses is the API name of your custom picklist

    • Click Activate at the top of the Workflow Rule detail page.
  • Piyush

    January 22, 2018 at 7:31 am

    Hi Manpreet,

    In Lightning, Subject picklist is not available. You have to enter the text into the subject while working in lightning. If you want then you can create a new subject with picklist and customize the Task composer window and put that custom field there. Take a look here to customize the composer window here

    • This reply was modified 3 years, 10 months ago by  Piyush.
  • Piyush

    January 22, 2018 at 7:28 am

    Hi Manpreet,

    Reason why It Occurs:

    The maximum number of given API calls allowed for your Salesforce Organization have been reached. Can occur after syncing large amounts of data.


    API calls are reset 24 hours from when they are used. To learn more about Salesforce API calls, please refer to their API Usage Metering.

    As per this we need to wait till or less, until its resetting itself.

  • Piyush

    January 18, 2018 at 8:47 am

    Hi Manpreet,

    It is not possible , by default Grant Access Using Hierarchies options are enabled for standard objects and they can not be changed. For custom objects we can change “Grant Access Using Hierarchies “settings .

    Hope this help you.

  • Piyush

    January 17, 2018 at 7:45 am

    Hi Manpreet,

    Transient keyword to declare instance variables that can't be saved, and shouldn't be transmitted as part of the view state for a Visualforce page.

    Given below example is use of transient variable where we have created two Date Time and populating. Refresh button is using for refresh the VF page however only time T2 will change at because of this is declare as transient.


    <apex:page controller="TransientController">
    T1: {!t1} <br/>
    T2: {!t2} <br/>
    <apex:commandLink value="refresh"/>


    public class TransientController {

    DateTime t1;
    transient DateTime t2;

    public String getT1() {
    if (t1 == null) t1 =;
    return '' + t1;

    public String getT2() {
    if (t2 == null) t2 =;
    return '' + t2;

    Hope this will help you .

    • This reply was modified 3 years, 10 months ago by  Piyush.
  • Piyush

    January 17, 2018 at 7:34 am

    Hi Manpreet,

    When a field is marked as an External ID, its values can be used to match and associate related records to one another. External IDs are commonly used to store unique record identifiers from external systems and allow for routinely loading data into Salesforce without having to prepare your import file with existing or related Salesforce record IDs each time.

    • External ID prevent duplicate records from being created as a result of the import operation.
    • If we perform an upsert operation using the External ID filed it Insert for new records or perform an Update for existing records.
  • Piyush

    January 11, 2018 at 10:08 am

    Hi Rajan,

    In the Admin Tab:

    1. Click on the “Admin” Tab Click on “Business Units”
    2. Search for your Business Unit by typing parts of the name in the “Search”
    3. Press Search
    4. Choose your Business Unit
    5. Click Define Subscriber filter

    A prerequisite to this will be to create a Subscriber Profile Attribute from Subscribers > Profile Management.

    You will need to set the Subscriber with the profile attribute in order to define which business unit / Subscriber Filter they shall apply to.

    Hope this will help you ...


  • Piyush

    January 11, 2018 at 8:23 am

    Hi Abhishek,

    You can get the session id using this:-

    String sessionID = UserInfo.getSessionId();

    You can get the accessToken using this:-

    Create connected app then fill all the details then call this https method it will  provide you access token

    public final String clientId ='';
    public final string clientSecret='';
    public final String userName = '';
    public final String password = '';
    HttpRequest req = new HttpRequest();
    req.setBody('grant_type=password' +
    '&client_id='+ clientId +
    '&client_secret='+ clientSecret +
    '&username=' + EncodingUtil.urlEncode(userName, 'UTF-8') +
    '&password=' + EncodingUtil.urlEncode(password, 'UTF-8'));
    Http h = new Http();
    Httpresponse res = h.send(req);
    string body = res.getBody();

    system.debug('***** Body -- '+ body);

    wrapperForHttp wObj = (wrapperForHttp)Json.deserialize(body,wrapperForHttp.class);
    string accessToken = wObj.access_token;
    system.debug('***** accessToken -- '+ accessToken);


    Hope this help you..

    • This reply was modified 3 years, 10 months ago by  Piyush.
  • Piyush

    January 11, 2018 at 8:16 am

    Hi Adarsh,

    Thanks for the response but I need this functionality in AngularJS. In AngularJs we did not support "return event.charCode".


  • Piyush

    January 10, 2018 at 9:47 am

    Hi Ankit,

    How you identify that the record was duplicate.  Can you please explain more on that.


  • Piyush

    January 10, 2018 at 8:57 am

    Hi Swapnail,

    Can you please explain more on this Question so we can provide some solutions or view on that .


  • Piyush

    January 9, 2018 at 1:51 pm

    Process Builder
    The Lightning Process Builder is a new workflow tool that helps you easily automate your business processes by providing a powerful and user-friendly visual representation of your process as you build it. Instead of doing this repetitive work manually, you can configure processes to do it automatically. The Process Builder’s simple and powerful design allows you to automate processes.

    You can use the Process Builder to perform more actions than with workflow:

    1. Create a record
    2. Update any related record
    3. Use a quick action to create a record, update a record, or log a call
    4. Launch a flow
    5. Send an email
    6. Post to Chatter
    7. Submit for approval
    8. Call apex methods
    9. But the process builder doesn’t support outbound messages.

    Workflow is business logic that evaluates records as they are created and updated and determines if an automated action needs to occur. In a way it allows records to speak up or do something – update data, notify people or external systems.

    Workflow does only 4 actions

    1. Create Task
    2. Update Field
    3. Email Alert
    4. Outbound Message

    Hope this will help you.


    • This reply was modified 3 years, 10 months ago by  Piyush.
  • Piyush

    January 9, 2018 at 1:46 pm

    Hi Kapil,

    Custom labels enable developers to create multilingual applications by automatically presenting information (for example, help text or error messages) in a user’s native language. Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. The values can be translated into any language Salesforce supports. We have also use custom label in our visulforce page to make that label dynamically .


  • Piyush

    January 9, 2018 at 10:42 am

    Hi Suryadeep,

    Marketing Cloud is a platform comprised of several products that helps you reach your customers at the right time, with the right message, and in the right way. It helps you connect with your customers via email, text message, push notification, dynamic web and landing pages, Facebook, Twitter, LinkedIn, Instagram…whew! That’s right, it’s about way more than just email.

    Sales Cloud is a customer relationship management (CRM) platform designed to support sales, marketing and customer support in both business-to-business (B2B) and business-to-customer (B2C) contexts.
    "Sales Cloud" refers to the "sales" module in It includes Leads, Accounts, Contacts, Contracts, Opportunities, Products, Pricebooks, Quotes, and Campaigns (limits apply).


  • Piyush

    January 9, 2018 at 9:07 am

    Hi Suryadeep,

    Software as a service (or SaaS) is a way of delivering applications over the Internet—as a service. Instead of installing and maintaining software, you simply access it via the Internet, freeing yourself from complex software and hardware management.

    Platform as a service (PaaS) or application platform as a service (aPaaS) is a category of cloud computing services that provides a platform allowing customers to develop, run, and manage applications without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app.


  • Piyush

    January 9, 2018 at 9:04 am

    Hi Manpreet,

    Have you add attribute docType="html-5.0" in your apex page tag ? If Not please add this attribute it will resolve your issue.



  • Piyush

    January 9, 2018 at 8:16 am

    Hi Ravi,

    1) Have you checked that if the field "ZipCode" is marked as unique? If yes then deselect the checkbox and then try again.
    2) Check if there is any duplicate rule on that Object.
    3) Also, check if there is any Trigger is active .


  • Piyush

    January 9, 2018 at 7:55 am

    Hi Manpreet,

    In AURA , it is made easy to pass the URL parameters to the controllers. This only works for attributes of type String and must be appended in  .app resource. You can’t request URL parameter value for a .cmp resource directly.

    Please have a look  on this blog :-

    Piyush Kumar

  • Piyush

    November 4, 2016 at 1:49 pm

    Hello Tanu ,

    It's not possible to do directly in JavaScript or Visualforce page. You'll need to embed a short WAV file in the HTML, and then play that via code.

  • Piyush

    November 4, 2016 at 1:46 pm

    Hello Tannu,

    Have you  enabling Auto Complete for your custom object on  the search page?

    Please follow the process to use Custom lookup in the given blog :-

    This may be helps you.


  • Piyush

    September 15, 2016 at 2:39 pm

    Hello Mohit,

    Maximum 32 fields can be grouped in SOQL .


  • Piyush

    August 26, 2016 at 2:35 pm

    Hello ,

    Try this sample of code to delete the contacts which are not associated with Account.

    List<Contact> conList =[select Id,Name from contact where AccountId = null];
    System.debug('List of contacts Whoes Account Id is null'+conList);
    delete conList;


  • Piyush

    August 26, 2016 at 2:23 pm


    Yes, You can  hide "new" button on  Standard Object using the home page component . In background of the home page component you should write your java script code to hide the new button.

    This might be helped you to hide New button.


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

    August 26, 2016 at 12:39 pm

    Hi Arun,

    You have to add one more JQuery file named "jquery-2.2.3.min.js" before the "select2.min.js" script. When the "select2.min.js" file load it can not find the main jquery file that's why it was failed.

    Piyush Kumar

Viewing 1 - 25 of 110 posts