Forum Replies Created

Page 9 of 12
  • PRANAV

    Member
    March 24, 2017 at 6:42 am in reply to: How can we design a custom community template in Salesforce?

    Hi Saurabh

    Thanks for your response.

  • PRANAV

    Member
    February 23, 2017 at 8:27 am in reply to: What is S controls in salesforce?

    Hi Suraj,

    S-controls provide a flexible, open means of extending the Salesforce user interface, including the ability to create and display your own custom data forms.

    But, Visualforce pages supersede s-controls. Organizations that haven’t previously used s-controls can’t create them. Existing s-controls are unaffected, and can still be edited.

    For more knowledge please visit this link.

    Hope this helps you.

    Thanks

  • Hi Mohit,

    Please go through the following link, hope this will help you a lot:

    http://sfdcsrini.blogspot.com/2014/12/adding-and-deleting-rows-dynamically-in.html

    Thanks

  • PRANAV

    Member
    January 23, 2017 at 8:38 am in reply to: How can I detect/disable active assignment rules in Apex?

    Hi Tanu,

    Please refer to this link, you can get your solution from here.

    Thanks

  • Hi Tanu,

    You can specify the workflow rule criteria first, if your rule criteria satisfies then your email alert action would perform else email would not sends out. Hope this helps you.

    Thanks

  • PRANAV

    Member
    January 23, 2017 at 8:23 am in reply to: How the hierarchical custom settings are set up?

    Hi Himanshu,

    Please refer to this link. Hope this helps you.

    Thanks

  • Hi Sushant,

    You can get ID in the JS controller directly, no need to assign to another attribute,

    Do like this:
    In your component, assign the record Id to the button's Id

    <aura:iteration items="{!v.newCases}" var="case">
    <button type="button" onclick="{!c.showCaseDelete}" id={!case.Id}>Delete</button>
    </aura:iteration>

    In your JS controller, capture the ID as as source of event:

    showCaseDelete: function(component, event, helper) {
    var idx = event.target.id;
    alert(idx); //here is your ID
    });

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    January 10, 2017 at 10:52 am in reply to: Difference between List,Set And Map in Salesforce

    Hi Vikas,

    A list is an ordered collection of elements that are distinguished by their indices. List elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

    A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

    A set is an unordered collection of elements that do not contain any duplicates. Set elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

    Yes, you can use List of list but it depends on scenario to scenario which suits best for the functionality.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    January 9, 2017 at 10:48 am in reply to: In Salesforce, how many callouts we can call in Batch Apex?

    Hi Sushant,

    The start, execute, and finish methods can implement up to 10 callouts each in Batch Apex Governor Limits.

    Thanks

  • Hi Sushant,
    To get or Query deleted records you need to use ALL ROWS So your query will be

    List<Object__c> lisOfDeletedRecords = [SELECT Id FROM Object__c WHERE ID IN :lstTriggerOld AND ID NOT IN : lstAllRecords ALL ROWS];

    Hope this helps you.

    Thanks

  • Hi Sushant,

    Visualforce components are rendered intelligently by the platform. For example, rather than forcing page designers to use different component tags for different types of editable fields (such as email addresses or calendar dates), designers can simply use a generic <apex:inputField> tag for all fields. The Visualforce renderer displays the appropriate edit interface for each field. Visualforce components are page-centric and most of the work is done on the server.

    Thanks

     

  • PRANAV

    Member
    January 3, 2017 at 6:08 pm in reply to: Inline forms in salesforce lightning

    Hi Kumar,

    First, Create a component for form which implements="flexipage:availableForAllPageTypes". Now this component will be visible for custom tab and you can create a custom tab for this form on the detailed page.

    Thanks

  • PRANAV

    Member
    January 3, 2017 at 6:01 pm in reply to: How to write test class for Document object in Salesforce?

    Hi Sushant,

    Document documentObj;

    documentObj = new Document();
    documentObj.Body = Blob.valueOf('Some Document Text');
    documentObj.ContentType = 'application/pdf';
    documentObj.DeveloperName = 'my_document';
    documentObj.IsPublic = true;
    documentObj.Name = 'My Document';
    documentObj.FolderId = [select id from folder where name = 'My Test Docs'].id;
    insert documentObj;

    Use this snippet of code under your test class, this may help you.

    Thanks

  • PRANAV

    Member
    January 3, 2017 at 5:48 pm in reply to: What is wrapper class? where can we use it in salesforce?

    Hi Sushant,

    A wrapper or container class is a class, data structure, or an abstract data type whose instances are a collections of other objects.It is a custom object defined by Salesforce developer where he defines the properties of the wrapper class. Within Apex & Visualforce this can be extremely helpful to achieve many business scenarios within the Salesforce CRM software. A Wrapper class is a class whose instances are collection of other objects. It is used to display different objects on a Visual Force page in same table. A perfect scenario where a wrapper class can be used is for multiple checkboxes and pagination.

    Hope this helps you.

    Thanks

  • Hi Vikas,

    database.query in Salesforce allows you to make a dynamic SOQL query at runtime. You can build up a string and then use that as a query string at run time in the database.query statement to make a SOQL call that is determined at run time. In Batch Apex, if you use Database.query(), it supports 50,000 records only.

     

    database.getQueryLocator in Salesforce returns a Query Locator that runs your selected SOQL query returning list that can be iterated over in batch apex or used for displaying large sets in VF (allowing things such as pagination). In Batch Apex, if you use Database.getQueryLocator(), it supports upto 50 million records.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    December 20, 2016 at 2:53 pm in reply to: Difference Between Change Sets And Apache Ant Migration

    Hi Vikas,

    Both the Change Sets and Ant Migration can be used for deployment for almost anything. Personally I found, if deployment is small, I use changeset but for larger deployments(and first time deployment of large project) we prefer Ant Migration Tool.

    As in Change Sets - If we've to deploy about 100 fields for some object. We've to make individual selection of each field to add in changeset before uploading to other environment. Consider If you've 10-15 such object of these type!. This is too much time consuming and error-prone. Through Ant, all what We've to do is to mention object in XML, all fields will automatically get deployed.

    Other thing, If We've to delete components in production, We've option to do through ANT( Destructive.XML) while no such option is available in Change Set.

    Change Set is only used for deployment in connected orgs, while through ANT you can deploy in any org.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    December 20, 2016 at 2:18 pm in reply to: How to test Future methods in Salesforce?

    Hi Sushant,

    You must use startTest() and stopTest(). All asynchronous calls made after the startTest() method are collected by the system. When stopTest() is executed, all asynchronous processes are run synchronously.

    Simply call your @future method in-between these, and then make your asserts after the stopTest().

    The stopTest() will cause the @future method to fire, and the next statement can verify the functionality you developed in your future method.

    Hope this helps you.

    Thanks

     

  • PRANAV

    Member
    December 20, 2016 at 1:13 pm in reply to: Roll up summary to count attachments on Salesforce Opportunity

    Hi Kumar,

    I don't think without writing apex trigger it is not possible. You can't create workflow or validation rules on Attachments and you can't do a roll-up summary field either. So You can write a trigger that will count the no. of attachments and write the same into a custom field on Opportunity object.

    Hope this helps you.

    Thanks

     

  • PRANAV

    Member
    December 6, 2016 at 5:19 am in reply to: How to send email attachments through Salesforce Apex code?

    Hi Kumar,

    You can send email attachments through apex by using setFileAttachments(fileNames); method in your apex code.

    For more guidance please refer SingleEmailMessage Methods of Salesforce Guide.

    Hope this helps you.

    Thanks

  • Hi Vikas,

    • WhoID in Salesforce refers to people things.  So that would be typically a Lead ID or a Contact ID. The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact’s ID or a lead’s ID. The label is Name ID.
    • WhatID in Salesforce refers to object type things.  That would typically be an Account ID or an Opportunity ID. The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID.

    Thanks

  • Hi Mohit,

    You can use this piece of code

    fieldNameToString = new List<String>();
    fieldNames = new List<SelectOption>();
    String typeName = 'Case';
    Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    Schema.SObjectType ObjectSchema = schemaMap.get(typeName);
    Map<String, Schema.SObjectField> fieldMap = ObjectSchema.getDescribe().fields.getMap();

    for(String fieldName: fieldMap.keySet()) {
    fieldNames.add(new SelectOption(fieldName,fieldName));
    fieldNameToString.add(fieldName);
    }
    System.debug('all fields' + fieldNames);
    System.debug('fieldNameToString' + fieldNameToString);

    Hope this helps you.

    Thanks

  • Hi Ashley,

    When modelling a many-to-many relationship, you use a junction object to connect the two objects you want to relate to each other.

    Thanks

  • PRANAV

    Member
    October 20, 2016 at 5:53 am in reply to: How many components can a Salesforce Dashboard have?

    Hi Ashley,

    Each dashboard can have up to 20 components.

    Thanks

  • Hi Mohit,

    There are many differences between these two as

    • DateTimes de/serialize as quoted strings and for a time, the @RemoteAction serializer did not.
    • @RemoteAction methods can serialize, but not deserialize ENUM values.
    • JSON.deserialize will not handle deserializing into List<Object>, @RemoteAction deserialization will deserialize primitives properly into List<Object> but complex types will deserialize as nulls.
    • Returning from a @RemoteAction doesn't run getters, JSON.serialize does.
    • JSON.deserialize and @RemoteAction deserialization both run setters.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    October 13, 2016 at 5:29 am in reply to: How can we compare two profiles in Salesforce org?

    Hi Mohit,

    You can compare two profiles with the help of some applications like Perm Comparator (HerokuApp) and Arxxus Profile Comparator (AppExchange) .

    Hope this helps you.

    Thanks

Page 9 of 12