Forum Replies Created

Page 2 of 4
  • Anurag

    Member
    September 10, 2018 at 2:42 pm in reply to: What is MIXED-DML-OPERATION error and how to avoid?

    Hi Prachi,

    Mixed DML operations within a single transaction aren’t allowed. You can’t perform DML on a setup sObject and another sObject in the same transaction. However, you can perform one type of DML as part of an asynchronous job and the others in other asynchronous jobs or in the original transaction. This class contains an @future method to be called by the class in the subsequent example.

    Use @future to Bypass the Mixed DML Error in a Test Method

    public class InsertFutureUser {
    @future
    public static void insertUser() {
    Profile p = [SELECT Id FROM Profile WHERE Name='Standard User'];
    UserRole r = [SELECT Id FROM UserRole WHERE Name='COO'];
    User futureUser = new User(firstname = 'Future', lastname = 'User',
    alias = 'future', defaultgroupnotificationfrequency = 'N',
    digestfrequency = 'N', email = '[email protected]',
    emailencodingkey = 'UTF-8', languagelocalekey='en_US',
    localesidkey='en_US', profileid = p.Id,
    timezonesidkey = 'America/Los_Angeles',
    username = '[email protected]',
    userpermissionsmarketinguser = false,
    userpermissionsofflineuser = false, userroleid = r.Id);
    insert(futureUser);
    }
    }

  • Anurag

    Member
    September 10, 2018 at 1:48 pm in reply to: more than one server side controller in lightning

    Hi Anjali,

    Component allows include child components or inherited from super component. Each component has one controller.

    using inheritance

    <!-- BaseComponent -->
    <aura:component extensible="true" controller="BaseComponentController">
    </aura:component>

    <!-- child component -->
    <aura:component extends="BaseComponent"
    controller="childComponentController">
    </aura:component>

  • Hi Madhulika,

    It is not legal to define a class and interface with the same name in the same class. It is also not legal for an inner class to have the same name as its outer class. However, methods and variables have their own namespaces within the class so these three types of names do not clash with each other. In particular it is legal for a variable, method, and a class within a class to have the same name. Following Java standards for naming, that is, classes start with a capital letter, methods start with a lowercase verb, and variable names should be meaningful.

  • Hi Anjali,

    After preparing your data for import, use the Data Import Wizard to map the data fields and run the import.

    1.Prepare your data for import and create an import file. Doing this step first prevents errors, duplication of data, and frustration.

    2. Start the wizard.

    3.Choose the data that you want to import.

    4.Map your data fields to Salesforce data fields.

    5.Review and start your import.

    6.Check import status.

  • Anurag

    Member
    September 6, 2018 at 2:17 pm in reply to: What is Quantity Schedule in Salesforce?

    Hi Anjali,

    A quantity schedule contains information about a product’s shipping details. It outlines the dates, number of product units, and number of installments needed for shipping or billing a specific product. Quantity schedules are often used alongside revenue schedules to ensure accurate monitoring of product movement.Companies engaged in selling products and shipping them to end-customers mostly benefit from using quantity schedules. Take for instance a magazine subscription company. They bill subscribers annually and deliver the products on a monthly basis. They can use quantity schedules to aid in monitoring the product units that need to be shipped and if there are any pending subscription payments that need to be settled first.

  • Hi Shradha,

    Salesforce allows you to configure Organization Business Hours to select the days and hours that your support team is available.  When Business Hours is selected from the General Setup section of the setup wizard, as shown below, Case Flags will exclude the time elapsed outside of your company’s normal hours of operation.

    When using Business Hours with Case Flags, be sure to include the appropriate Business Hours fields in your page layouts, reports, workflow rules, etc. Business Hours fields will contain either the words "business hours" in the label for each, or the letters "(BH)".

    Once enabled, Case Flags will recognize your organization's business hours settings, and apply them for each feature throughout the package. No additional case-specific setup or configuration is required.

  • Anurag

    Member
    September 5, 2018 at 2:15 pm in reply to: How to give input field in lightning:datatable?

    Hi Prachi,

    To give an input field to a lightning datatable,

    • First make an attribute of the type list(say name-mycolumns).
    • Then, in an init function in a javascript controller, set this component with the field label , field type and any other thing if you want.Those are the things which are assigned to that 'mycolumn' atttrbute.
    • Lastly, get this attribute in column property of lightning:datatable  .

    Summary:

    Step 1:

    <aura:attribute name="mycolumns" type="List"/>

    Step 2:

    init: function (cmp, event, helper) {
    cmp.set('v.mycolumns', [
    {label: 'Contact Name', fieldName: 'Name', type: 'text'},
    {label: 'Phone', fieldName: 'Phone', type: 'phone'},
    ]);

    Step 3:

    <lightning:datatable columns="{! v.mycolumns }" />

    Hope this helps.

  • Anurag

    Member
    September 5, 2018 at 1:23 pm in reply to: Explain the difference between CRM and PRM in Salesforce.

    Hi Anjali,

    PRM and CRM are quite similar in nature, both architecturally and in terms of their functionality. However, there are some fundamental differences between the two types of platforms.

    Core Similarities between PRM and CRM

    Here is a high-level summary of how PRM tends to behave like a CRM, mostly from an architectural and workflow perspective:

    Architecture – Both PRM or CRM use software that is built on the latest web services technology. Both employ a three-tier architecture (database layer, application layer and web presentation layer). They also tend to run on software as a service (SaaS) infrastructure.
    Application framework – Both PRM and CRM have a core platform which houses records—records of partners in the case of PRM, and records of end users in the case of CRM. However, additional applications can be plugged into this framework to do more. A common example is quote-processing software that you can plug into a basic CRM application, allowing the sales rep to send quotes directly from the CRM to the client. Similarly, with PRM you can plug in a learning management system (LMS) or partner incentives management (PIM) software to keep track of partner training or incentives programs.
    Records structure – The records structure for both PRM and CRM are pretty much identical at a core level, including fields for things like contact name, title, company name and address. Like a state-of-the-art CRM platform, a best-in-class PRM platform also allows records customization and the addition of various customizable fields. This is essential to allow adaptation of a basic record structure into a specific organization. Since each organization is different, chances are most of the fields that are used and tracked are also going to be different.

    Core Differences between PRM and CRM

    With the similarities in mind, let’s now focus on what’s different between CRM and PRM platforms.

    Purpose-built – A CRM system is, by definition, designed for customer relationship management, so in most cases the way accounts are set up is designed for a direct sales team to prospect, sell and grow existing end-customer accounts directly. On the other hand, PRMs are built for partner relationship management and the structure, workflow, applications, etc. are all designed for partner network management or channel management. Architecturally the two systems have a number of similarities, but functionally they are two very different applications.
    Pricing – Most CRM solutions are sold with per-user, seat-based licensing. This doesn’t work nearly as well in the partner management universe, simply because it is very hard, if not impossible, to predict utilization rates. If an organization pays too much to provide user licenses to all of their partners, they may end up wasting a lot money unnecessarily; on the other hand, if the organization doesn’t buy enough licenses and too many partners start using the product, they may get a rude awakening when the bills start coming in later on. This is why it is essential to procure PRM licenses for unlimited use, so that an organization is not taking unnecessary risks either way. If you are considering investing in a PRM system, look for providers like ZINFI who provide a very affordable unlimited usage model.

  • Anurag

    Member
    September 4, 2018 at 2:03 pm in reply to: How to use My Domain feature to configure a custom domain in Salesforce?

    Hi Madhulika,

    Implementing a custom domain for your site creates brand recognition and gives you additional control and functionality.

    Create a CNAME entry in your DNS
    1. Click Setup.
    2. Under "Administer," click Domain Management | click Domains.
    3. Click Add A Domain.
    4. Copy the 18 digit token. This token is case sensitive so copy it exactly as displayed.

    Add the Custom Domain information to Salesforce

    This is a 2 step process, first you'll need to add the domain information to your org, and then you'll map the custom domain to your Salesforce Site.
    Add the domain information to your Salesforce Org

    1. In your Salesforce Org, click Setup.
    2. Under "Administer," Click Domain Management | click Domains.
    3. Click Add A Domain.
    4. Enter your custom domain in the Domain Name field.

  • Hi Anjali,

    • First we need to make sure that you have Ant migration tool in your system.We will need it to provide the details of the credentials and the type of metadata you want to migrate.
    • We also need to have Java and Apache Ant installed on your system.
    • Second step is to load the credentials of both the salesforce org in the file called 'build.properties'.
    • The credentials that we provide is what it passes to the file 'build.xml' .When the data is being migrated, the build.xml file is what is used.
    • Then we provide the details of the metadata that we want to migrate to the org.It could be anything such as apex classes, custom and standard objects, custom fields, aura bundles etc. We provide these details in the file 'package.xml'.
    • After providing all the details, we first retrieve the data from the salesforce org using the command 'ant retrieveUnpackaged' and followed by 'ant deployUnpackaged' after the retrieving has been successfully done.
    • Before doing these we must make sure that the path has been set up to the directory of the 'unpackaged' folder.

     

  • Hi Shradha,

    It simply compares the the expected value (in this case '0') with the actual value (in this case 'lt.size') and throws an error which is ‘Tasks exist before job has run' in case it is false. Actually it is verifying that the scheduled job has not run yet before the task.

     

  • Anurag

    Member
    September 3, 2018 at 2:04 pm in reply to: What is manual sharing (User Managed Sharing)?

    Hi Avnish,

    Manual Sharing is used to grant one-off access. Manual sharing can be granted by record owner, any one above the owner in role hierarchy and System Administrator. Manual sharing is used to handle exception cases where access to a particular record needs to be given to a specific user.

  • Anurag

    Member
    September 3, 2018 at 1:56 pm in reply to: How many external Id's are allowed on a Salesforce Object?

    Hi Anjali,

    Maximum number of External IDs per object or entity which you can designate is 25 fields per object. External ID fields must be Custom text, number or email fields. External ID fields contain record IDs from systems outside Salesforce.

  • Hi Prachi,

    As Salesforce developers we should not always dive straight into coding just because we can. Salesforce offers a rich set of declarative development features and before implementing customizations or new functionality, we should always make sure that we are familiar and keep up to date with Salesforce’s native capabilities and that we have exhausted all native options before we start to code and reinvent the wheel.

    Using native functionality or declarative development features has many benefits from time and cost savings to easier maintenance and sometimes better usability.Of course not everything can be built without coding, and there is a time and plenty of places when writing code is the right approach to build something. Make yourself aware of the native and declarative-development features in Salesforce before you code, and evaluate them in your design before you consider coding.

  • Anurag

    Member
    September 3, 2018 at 1:42 pm in reply to: What does the View State represent in a Visualforce page?

    Hi Anjali,

    View state is a state of you VF page, which help salesforce to regenerate VF page when it come back from server.

    For example, when you create a VF page having a some input fields,  consider that you load this page with some value and there are some required field on this page and when you click on a button this page will get submitted to server then when server replay back your page should be loaded in same state as it was before submit button click, to maintain this salesforce exchange data between VF and servers and this information which salesforce maintain is know as View state.

  • Anurag

    Member
    September 3, 2018 at 1:40 pm in reply to: How can I increase API call limit in my salesforce org? 

    Hi Chanchal,

    If the default API Limit is insufficient for your business requirements, you can request a temporary or permanent increase to the limit.

    Permanently increasing your API limit (or for more than 2 weeks) can be requested by contacting your Account . Temporary increase Request a  to your API limit for a maximum of two weeks. Just create a case with Salesforce Customer Support and answer the few questions that follow.

  • Anurag

    Member
    August 31, 2018 at 2:55 pm in reply to: How to add multiple contacts to campaign in Salesforce?

    Hi Chanchal,

    • From the Campaign Members related list on a campaign, click Add Leads or Add Contacts.
    • Select leads or contacts from the list, or search for specific leads or contacts.
    • Click Next.
    • Select a member status for the added members.
    • Choose whether to apply the member status to selected leads or contacts who are already members of the campaign.
    • Click Submit.
  • Anurag

    Member
    August 31, 2018 at 2:20 pm in reply to: What is appexchange? How can I host my application on appexchange?

    Hi Prachi,

    An appexchange is a repository for listing all the applications developed on the Force.com platform. You can browse through those applications for details and even install it in your environment. You need to develop your application in your DE org in order to host it in Appexchange.

  • Anurag

    Member
    August 31, 2018 at 2:18 pm in reply to: For which data type we can enable external id?

    Hi Prachi,

    A custom field can be marked as an external ID to identify the primary keys of the legacy system (outside Salesforce). Text, number, e-mail, and auto-number fields can be flagged as external IDs.

  • Anurag

    Member
    August 30, 2018 at 1:37 pm in reply to: Can we avoid deletion of records through validation rules?

    Hi Anjali,

    You can't use a Validation Rule to prevent a Deletion of records.  That has to be done through a trigger.

  • Anurag

    Member
    August 30, 2018 at 1:35 pm in reply to: Trigger in salesforce

    Hi Madhulika,

    You need to add one Static Boolean variable to a your utility/helper class (any apex class), and check its value within affected triggers, where you do think this trigger will get fired more than once.

    "MyUtilityClass" is your helper  / utility apex class  where we will have our static boolean variable - e.g. declared as "runOnceFlag= true"

    public class MyUtilityClass {
       public static boolean  runOnceFlag= true;
    }

    Sample example Trigger - where you will check for the value of static boolean variable "runOnceFlag"- For first time its value will be equal to TRUE, and we will set its value to FALSE in our trigger to avoid second run.

    trigger myTriggerName on Account (before delete, after delete) {
        
         if(Trigger.isBefore && Trigger.isDelete){
       
             if(MyUtilityClass.runOnceFlag){
                    MyUtilityClass.runOnceFlag=false;           }
        }
    }

  • Hi Avnish,

    Users can view records of all record types so long as they have read access to the object and sharing (at least read) access to the record.

    The explicit record type settings on the profile controls on which RecordTypes can user create records for, if they have write access on the object.

  • Anurag

    Member
    August 30, 2018 at 1:17 pm in reply to: Is it possible to restrict permission for users using permission set?

    Hi Avnish,

    You can use permission sets to grant  or restrict permissions and access settings to users.In some cases, you may want users to have access to an object, but limit their access to individual fields in that object.

  • Anurag

    Member
    August 30, 2018 at 9:25 am in reply to: Lead Conversion

    Hi Parul,

    This error will appear if the following condition is met:

    There is a time-based workflow action pending that is related to the Lead. Or, there is a Process Builder with a time-based action pending that is related to the Lead.

    • A pending Workflow action can be tracked down by going to Setup | Monitoring | Time-Based Workflow. Then filter on criteria related to the Lead record that caused the error to see which workflow is implicated.
    • A pending Process Builder action can be tracked down by going to Setup I Process Automation I Flows.
  • Anurag

    Member
    August 29, 2018 at 12:36 pm in reply to: Can we create a field on Person Account directly in Salesforce?

    Hi Prachi,

    No. We need to create a field on contact which will appear for Person Account as well. Fields created on Contact appear on Account with extension __pc. a Person Accounts is also considered a Contact in the salesforce back-end, therefore, person accounts have an Account Id and a Contact Id. Every custom field created in the Contact object is available for Person Accounts using the __pc. If you want a field for person account only create the field in the Contact object.

Page 2 of 4