Forum Replies Created

Page 2 of 4
  • Hello Shubham,

    • From the object management settings for cases, go to Page Layouts.
    • How you access the Case Feed Settings page depends on what kind of page layout you’re working with.

    This may help you:

    https://help.salesforce.com/articleView?id=case_interaction_attachment_component.htm&type=0

     

    • This reply was modified 7 years, 4 months ago by  Radhakrishna.
  • Radhakrishna

    Member
    July 19, 2017 at 5:00 am in reply to: which components are not available in changesets?

    Hello Uday,

    The components available for a change set vary by edition.
    have a look on the below link

    https://help.salesforce.com/HTViewHelpDoc?id=changesets_about_components.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=changesets_about_components.htm&language=en_US)

    Mark this as solution if it answers your problem.
    By selecting best answer you will save much time others if they are searching for same information.

  • Hello Shariq,

    It is common practice to have a boolean flag (say ByPass_VR__c), which can be set via Apex Code to skip it. Unless there is such a provision in this validation rule, you cant temporarily disable it via Apex code.

    The only 'work around' is to set field values such that the error formula doesn't evaluate to true.

    Example:

    AND(
    NOT(ByPass_VR__C),

    ..............

     

  • Radhakrishna

    Member
    July 19, 2017 at 4:55 am in reply to: what are the change set limitations in Salesforce?

    Hello Uday,

    ChangeSets is one of the primary tools that Salesforce provides for developers and administrators for the migration or deployment purposes. For an Enterprise Application System such as Salesforce, customers, partners, and the development community rely on a comprehensive and enterprise-grade set of tools to deliver innovation and releases rapidly and successfully. Here are eleven reasons why customers are looking for alternative deployment solutions to ChangeSets.

    Deploy all the metadata components in one shot: With Salesforce ChangeSets, you cannot deploy all the types of metadata components in one shot. For example, if you are deploying custom settings and a Visualforce page which leverages those custom settings, you cannot deploy all those components at once. You would first need to deploy custom settings, and then create a Changeset for deploying Visualforce page.

    Merge code with other developers: Salesforce recommends that each developer work in their own developer organization. However, if developers need to merge code from various organizations into a single deployment unit, it is not feasible by using Salesforce ChangeSets.

    Use the same ChangeSets across your delivery chain: Developers need to create Salesforce ChangeSets over and over again. For example, if a developer needs to deploy the code from Dev to QA to UAT organizations, they would have to create the ChangeSets twice to move across these two organizations.

    Perform partial deployment: Salesforce ChangeSets either deploy all the components or rollback all the components on any failure. There is no way to deploy successful components and ignore the failed components.

    Deploy all types of metadata components: Salesforce ChangeSets do not support all types of metadata components. If you need to deploy certain types of metadata components, you would have to deploy them manually or by using an IDE such as Eclipse.

    Integrate with version control: It’s not feasible to integrate Salesforce ChangeSets with any version control system.

    Stop overwriting changes from other developers: Because metadata components are not versioned, developers often overwrite each other’s changes. For example, a developer can deploy the latest version of a component. Subsequently, another developer can redeploy the “older version” of the component which was not changed.

    Quickly deploy: For any deployment, you need to upload ChangeSets and deploy them to the target organization. This greatly increases the deployment time.

    Governance across the delivery chain: With Salesforce ChangeSets, there is absolutely no governance. Any developer can make any modification to another organization if they have permissions to make changes to it. The auditor cannot track who made the changes to the organization.

    Impact analysis before deployment: Salesforce ChangeSets have a functionality of dependency. However, this functionality is not clearly useful. Ideally, the functionality should perform an impact analysis against the target organization and suggest the dependencies that should be automatically included.

    Maintain Sarbanes-Oxley compliance: One of the requirements for Sarbanes-Oxley is that IT organizations must maintain a complete change control over the infrastructure. With ChangeSets, there is no central place to track the changes made to an organization.

  • Hi,

    A formula is similar to an equation that is executed at run time. Depending on the context of the formula, it can make use of various data and operations to perform the calculation. A useful way to think about formulas is that they are similar to formulas on a spreadsheet. These formulas can make use of data and operations to calculate a new value of some type.

    Formulas are widely used in the Force.com platform and should be considered first before jumping into Apex Code. The same formula syntax can be used to create default values, data validation rules, custom field formulas, conditional logic on Visualforce pages, and rules for determining when certain actions should occur, such as workflow actions.

    for more details :- http://wiki.developerforce.com/page/An_Introduction_to_Formulas

  • Hello Shariq,

    Displaying a JavaScript variable can be done, but not as easily as you might think, as you can't embed '<' characters in the output string.

    I use the following mechanism:

    Two methods in my controller to generate the beginning/end of the JavaScript write:

    public String getJSStart() { return '<script>document.write('; } public String getJSEnd() { return ')</script>'; }

    I can then do the following on my page:

    <script> var str="Hello world!"; </script> <apex:outputText value="{!JSStart}str{!JSEnd}" escape="false"/>

    and I get the output I expect. Make sure you set the escape="false" attribute, otherwise you will just see a text version of the JavaScript.

    Setting a value is a little easier, although you still have to work a bit to get the component's id. Here's an example:

    var reasonEle=document.getElementById('{!$Component.dcForm.dcBlock.dcSection.reasonItem.reason}'); var str='Hello world'; if (reasonEle.value.length==0) { reasonEle.value=str; }

    When getting the element by ID, you have to supply the full path through the VisualForce component hierarchy. In my example above, the element (id=reason) is within a PageBlockSectionItem (id=reasonItem) within a PageBlockSection (id=dcSection) within a pageblock (id=dcBlock) within a form (id=dcForm)

  • Radhakrishna

    Member
    July 17, 2017 at 4:48 am in reply to: What is SOSL query ? How it works?

    Hello Shariq,

    SOQL statements evaluate to a list of sObjects, a single sObject, or an Integer for count method queries.

    This may help you:

    https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL.htm

  • Radhakrishna

    Member
    July 17, 2017 at 4:39 am in reply to: Things to remember while writing test class in Salesforce?

    Hello Shariq,

    Here are some best practices that I felt need to be followed while writing test classes in Salesforce

    All test methods should reside in a separate class from the class in which the method being tested resides.

    1. These classes should be appended with the word Test followed by the name of the class being tested, e.g. OpportunityServicesTest.
    2. These classes should all use the @isTest annotation.
    3. Each method in the production class should have, at a minimum, one corresponding test method in its test class and should be appended by “test”
    4. There should be a minimum of “Null Pointer Exception test” as part of negative testing for each method, specially the methods that accept parameters.
    5. A method without an assert statement is not considered a test method. Large number of relevant assert statements increases confidence in the correct behaviour of business logic.
    6. There should be a comment with each assert statement explaining what is being tested and what the expected output is
      Only use isTest(SeeAllData = true) on class methods in exceptional cases where there are sObjects that doesn't allow DML operation e.g. PriceBook creation
    7. No hard coded ids of any sObject in any test method.
    8. If a Constant needs to be asserted ,its a best practice to reference that from the Constant class or from Custom Labels or Custom Settings. Using hard coded string in unit tests( or any class for that matter) will trigger failures when things like Picklist values change
    9. All test data creation should be done from a Utility class. This allows for a streamlined creation of test objects that adhere to all the validation rules.
    10. Any business logic that needs to be tested should be enveloped within a Test.runAs(user) statement so profile restrictions can be tested. . Using any admin profiles should be avoided.
    11. All private methods should also have its corresponding unit test method. In the production code, add a public method for each private method and prepend it by “exposeForUnitTest_”.
    12. Creating multiple test method for testing that same production code method should be avoided. We want to ensure that our unit test methods are properly testing the logic but the same time the efficiency of the unit test method should not be ignored. All the unit test methods run with every deployment so the cumulative run time should be as small as possible
    13. Any asynchronous method testing should include Test.startTest and Test.stopTest. Test.stopTest forces the asynchronous methods to run so the results could be asserted.
    14. Any exceptions that are caught in the production methods should be tested by feeding the test data that throws exception. Exception Type and error message should be asserted.
    15. Every class should have test coverage close to 95% as possible. The focus should be on asserting method behavior rather than increasing coverage. There are very few instances where a method behavior is not straightforward to reproduce and hence test. These should be properly commented.
  • Radhakrishna

    Member
    July 14, 2017 at 10:39 am in reply to: What is the governor limits of sub query in SOQL?

    Hello Saloni,

    By using below points you can understand Salesforce governor limits of sub query in SOQL:

    In a SOQL query with parent-child relationship sub-queries, each parent-child relationship counts as an additional query. These types of queries have a limit of three times the number for top-level queries.

    The row counts from these relationship queries contribute to the row counts of the overall code execution.

    In addition to static SOQL statements, calls to the following methods count against the number of SOQL statements issued in a request.

    Database.countQuery
    Database.getQueryLocator
    Database.query
    From above statement i can clarify one point:

    For example your org contain  only 2 Account and each have 10 Contacts.

    If you execute this with sub Query like below

    Select Id, Name, (Select Id, Name from Contacts) From Account

    Then the total number of Query rows will be 22 (2+10+10).

    From above analogy we can understand like this

    If your org contain 40M accounts and each have 1 contact.

    Then in this scenario you can use sub query up to 25M only.

    Like this Select Id, Name, (Select Id, Name from Contacts) From Account limit 25M

    http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm

    • This reply was modified 7 years, 4 months ago by  Radhakrishna.
  • Radhakrishna

    Member
    July 14, 2017 at 10:35 am in reply to: How to write test class for outbound email services

    what do you actually want to test? the execution of the code or that the message gets delivered?

    how about you delegate it to a separate method sendNotication() which you can test independently. furthermore you can test it via console as well

    batch class

    global class MyBatch implements Database.Batchable<sObject> {

    // BATCH CONTRACT ...

    global void finish(Database.BatchableContext bc){

    if (MY_CONDITION)
    {
    sendNotification();
    }
    }

    public void sendNotification(){

    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    // CONFIGURE MAIL

    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
    }

    }

    test class

    @isTest
    private class MyBatchTest {
    static testMethod void sendNotificationTest(){

    Test.startTest();
    Integer emailbefore = Limits.getEmailInvocations();
    MyBatch batch = new MyBatch();
    MyBatch.sendNotication();

    system.assertNotEquals(emailbefore,Limits.getEmailInvocations(),'should have decreased');
    Test.stopTest();
    }
    }

  • Hello Shariq,

    Going the one way is difficult. If you need to assign a javascript value to an outputText for example you would need to find the field by it's ID within the DOM model and use the .value of the element to set the value. I don't think you'll see the value change in the form, but when it's submitting your apex code will get it's value.

    The other way is simpler. To get an apex value in javascript simply do this:

    var myVar = '{!MyVar}';

  • Hello Shariq,

     

    A custom picklist is tied to a particular object as a field on the object. Unlike a custom picklist field, a global picklist exists independently as a global picklist value set. Its values are shared with any picklist that’s based on it.

    A global picklist is a restricted picklist by nature. Only a Salesforce admin can add to or modify its values. Users can’t add unapproved values, even through the API.

    From Setup, enter Picklist in the Quick Find box, then select Picklist Value Sets.
    Next to Global Value Sets, click New.
    Enter a label for the global value set. This name appears in Setup, and when users create a picklist based on this global value set.
    To tell users what these values are for, enter a specific description of the global value set. This text appears on the Picklist Value Sets list page in Setup.
    Enter the values, one per line.
    Optionally choose to sort the values alphabetically or to use the first value in the list as the default value, or both. You can’t change these settings later.
    If you select both options, Salesforce alphabetizes the entries and then sets the first alphabetized value as the default.
    Click Save.

    Your global value set is ready to be used in custom picklist fields. You can reorder the values by clicking Reorder.

  • Radhakrishna

    Member
    July 13, 2017 at 4:44 am in reply to: How to create Macro instructions in Salesforce?

    Hello Aman,

    Have you worked through this help article?

    https://help.salesforce.com/apex/HTViewSolution?id=000213701&language=en_US

  • Radhakrishna

    Member
    July 13, 2017 at 4:40 am in reply to: Difference between synchronous and asynchronous in apex
  • Radhakrishna

    Member
    July 13, 2017 at 4:38 am in reply to: Difference between synchronous and asynchronous in apex

    Hello Shubham,

    An async call is queued up in Salesforce and run on a separate thread of execution. At this point it becomes decoupled from the calling action. That also means the calling action won't block and wait for a response from the asycn call. Using the future annotation identifies methods that are executed asynchronously. They must also be static methods. There are some considerations to know when using async methods.

     

    you can learn more here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation_future.htm

  • Hello Saloni gupta,
    A callout lets salesforce.com access external data. This reduces the need to have an integration server acting as a synchronizing bridge between salesforce.com and that external data. You can use this to get the weather in Timbuktu, the current stock market value for a ticker symbol, credit ratings, process merchant account payments. Anything you can think of, there is probably a service that can do that.

    Future methods run asynchronously. This means that the currently executing code continues without pause, and the future method is delayed until some point in the future by being placed into a queue. The asynchronous code will be that which is contained in the future method.

    This may help you:

    https://trailhead.salesforce.com/en/modules/apex_integration_services/units/apex_integration_rest_callouts

     

  • Hello Shariq,

    A profile contains user permissions and access settings that control what Users can do within their Organization.
    Profile controls
    There are two types of system permissions in a profile, Administrative and General.
    You can create a Custom Profile or a Permission Set if you have either Enterprise or Performance Edition to give access.
    In Contract Manager, Group, and Professional Editions you have 6 Standard Profiles that cannot be customized by default. but permissions can be added.

    For more info:

    https://help.salesforce.com/articleView?id=000198725&type=1

  • Hello Raghav,
    You can use the Process Builder to perform more actions than with workflow:

    Create a record
    Update any related record
    Use a quick action to create a record, update a record, or log a call
    Launch a flow
    Send an email
    Post to Chatter
    Submit for approval
    Call apex methods

    But the process builder doesn’t support outbound messages.

    Workflow does only 4 actions

    Create Task
    Update Fiel
    Email Alert
    Outbound Message

    More Info:

    https://help.salesforce.com/articleView?id=process_overview.htm&type=0

     

     

  • Hello Aman,

    It's not a matter of security. The HTTP protocol defines GET-type requests as being idempotent, while POSTs may have side effects. In plain English, that means that GET is used for viewing something, without changing it, while POST is used for changing something. For example, a search page should use GET, while a form that changes your password should use POST.

    Also, note that PHP confuses the concepts a bit. A POST request gets input from the query string and through the request body. A GET request just gets input from the query string. So a POST request is a superset of a GET request; you can use $_GET in a POST request, and it may even make sense to have parameters with the same name in $_POST and $_GET that mean different things.

    For example, let's say you have a form for editing an article. The article-id may be in the query string (and, so, available through $_GET['id']), but let's say that you want to change the article-id. The new id may then be present in the request body ($_POST['id']). OK, perhaps that's not the best example, but I hope it illustrates the difference between the two.

  • Hello Shariq,

    When you first learned that every record in Salesforce has a designated owner, you might have been a little surprised. In most database-driven applications and platforms, access to data isn’t tied to any ”’ownership” concept.

    Record ownership is at the core of Salesforce’s record access capabilities, which allow you to specify which users or types of users should be able to access specific records or types of records. Salesforce.com’s architects and developers have spent years creating a highly functional and massively scalable record access infrastructure around record ownership, saving you the monumental effort of building that infrastructure yourself.

  • Radhakrishna

    Member
    July 6, 2017 at 8:08 am in reply to: Download Attachments in Salesforce View

    Hello Trey,

    At the moment, if anyone needs to send attachments out of SalesForce, for instance, from a case, it is a very arduous and time consuming task. You have to download each and every file one at a time. Not good!

    My suggestion.

    Have a button called "View and Download". When you click it, you get a list of the attachemnts and for images you also get a thumbnail view of image files. Each file has a check box next it. You can then select each attachment and at the top and bottom of this list you have a button "Download as ZIP file". Press the button and you get all the selected files collected as a ZIP file and you can save it to your computer.

    There should also be a viewer for the image files like a highslide function. (sorry, I am mixing up suggestions)

    Alternatively, you should also be able to select the files attached to the record, while sending an email from that record. Like pictures out of a certain case. (oops one more suggestion).

    At any rate, getting files into SalesForce is easy, getting them back out in a timely fashion is a PITA.

    • This reply was modified 7 years, 4 months ago by  Radhakrishna.
  • Hello Shariq,

    You may be wondering why so many triggers are before triggers. There’s a good reason – they’re simpler to use. If you need to make any changes to a record entering your after trigger, you have to do a DML statement. This isn’t necessary in a before trigger – changes to records entering your trigger always save!

    The specific use case of an after trigger is when you need to associate any record to a record being created in your trigger. Here’s an example:

    // Automatically create an Opp when an Account is created
    trigger AutoOpp on Account(after insert) {
        List<Opportunity> newOpps = new List<Opportunity>();
        for (Account acc : Trigger.new) {
            Opportunity opp = new Opportunity();
            opp.Name = acc.Name + ‘ Opportunity’;
            opp.StageName = ‘Prospecting’;
            opp.CloseDate = Date.today() + 90;
            opp.AccountId = acc.Id; // Use the trigger record’s ID
            newOpps.add(opp);
        }
        insert newOpps;
    }
  • Radhakrishna

    Member
    July 4, 2017 at 8:55 am in reply to: Does trigger run batches?

    Hello Shariq,

     

    Triggers run in System context and you can't control its execution in Batch context.

    The way I would approach is to have a Boolean field and update it to true while running in the context of a batch execution.

    And,in the trigger I will check of this value is false then Trigger should execute ,if it is True then it should not.

    Hope this helps!!

  • Hello Bhanu Prakash,

    You would need to use Process builder and set up a Process on the Object you are creating to achieve this.

     

     

  • Hello Adarsh,

    advantages of Salesforce CRM for enterprise brands
    Collecting and organizing actionable customer data is a full-time job, and one that isn’t very forgiving of mistakes. As such, investing in a high-quality Customer Relationship Management (CRM) tool is a must for any business that wants to take customer satisfaction to the next level. CRM offers a number of advantages that will help you identify, understand, and assist your clients, so that you’ll never have to worry about losing revenue as a result of incomplete data. Here are six benefits of CRM software that can help your company find success.

    Improved Informational Organization
    The more you know about your customers, the better you’ll be able to provide them with the kind of positive experience that really pays off. Everything that they do, and every interaction that they have with your organization needs to be identified, documented, and recorded. To do this, you need to move beyond the sticky-notes and disorganized filing cabinets, and start utilizing advanced organizational technology that can not only accurately quantify and categorize data for easy future reference, but also make that data available across departments. Thanks to CRM this all becomes a possibility, it allows you to store a vast list of customers and any important information regarding them. Access to their file is even more convenient than before due to the cloud, so no matter who it is that is helping the customer in question, they’ll have the same actionable data instantly available. This will result in less wasted time for clients and employees.
    CRM for Enhanced Communication
    As mentioned above, CRM makes it possible for any employee to provide the same high level of service, by having access to the same customer data. After all, even if your customers have a single, main point of contact, there’s a good chance that at some point that contact may not be available, and the client will be forced to have to work with someone new. When that happens, many customers face the unhappy prospect of having to ‘start fresh’ with someone who doesn’t understand their own unique preferences and issues. CRM does away with this concern, by making detailed customer information communicable to whomever might need it. As such, it won’t matter who it is that is currently assisting the client, because they’ll be working from the same information. And given that CRM is cloud-based and accessible from any device with an internet connection, the communication benefits of mobile CRM are not limited to the office.
    CRM Improves Your Customer Service
    Your time is valuable, but so is your customers’ time. And, should your customers experience a problem that needs resolution, they’re going to be unhappy unless that problem can be taken care of quickly. With CRM, as soon as a customer contacts your company, your representatives will be able to retrieve all available activity concerning past purchases, preferences, and anything else that might assist them in finding a solution. In many cases, your more experienced representatives, armed with past information and history, will be able to locate a solution within the first few minutes, thanks to an accessible database of potential issues. And, should a solution not be readily apparent, then bringing in other representatives, or even crowdsourcing for answers through customer portals, is a simple matter. With CRM, customer support becomes a walk in the park.
    Automation of Everyday Tasks
    Completing a sale is never as easy as just getting a customer to agree to commit. Along with the surface details of any sale, there are hundreds of smaller tasks that must be completed in order for everything to function properly. Forms need to be filled out, reports need to be sent, legal issues need to be addressed—these ancillary chores are a time consuming, yet vital aspect of the sales process. The best CRM systems are designed to take the burden of many of these tasks from off the shoulders of your employees, thanks to the magic of automation. This means that your representatives will be able to focus more of their efforts towards closing leads and resolving customer pain points, while the automated CRM system takes care of the details.
    Greater efficiency for multiple teams
    Automatically stored communication allows you to view emails, calendar and phone call details in one easily accessible place. Add that to the ability for multiple teams to access the same information, it simply sky rockets the amount of achievable progress. Sales, marketing, and customer service teams can share valuable information about clients to continue to funnel them down the pipeline to get the desired result of closing a sale, knowledge of new products, or excellent customer service. Every department can now tag team to get the right information to the right individual. With this new found ease, teams can seamlessly work together to improve the bottom line.
    Improved Analytical Data and Reporting
    Miscalculated data should not be the reason you cannot succeed, with CRM this is no longer a possibility. CRM systems store information in one place which leads to improved analyzing of the data as a whole. Easily integrated with different tools or plugins, you have the ability to generate automatic reports to maximize your time. Personalize your dashboard views to quickly locate information needed such as customer information, sales goals, and performance reports to reach untapped opportunities. With better reporting data you can make resourceful and effective decisions to reap the rewards in customer loyalty and long run profitability.

Page 2 of 4