Forum Replies Created

Page 4 of 19
  • Anuj

    Member
    September 14, 2020 at 12:57 pm in reply to: CRUD permission in the profile ‘P1’ for an object O1 realted query in SF?
    • Any permission with respect to creation /deletion/Updating/viewing of object is possible only through permission set or Profile.
    • Meaning If we are able to create records in a object then the Create Permission in either Profile or in Permission Set should be enables. If its not enabled in the Profile then it has be in the Permission set.
    • So check for the permission set.
  • Anuj

    Member
    September 14, 2020 at 12:49 pm in reply to: How to convert Date into long data type in apex?

    Hi,
    You can use this
    Datetime dt = Datetime.now();
    Long l = dt.getTime();

  • Anuj

    Member
    September 10, 2020 at 1:32 pm in reply to: How do you get the recordTypeId in Salesforce apex?

    You Can directly query the RecordType by using name of recordType in Apex .
    For e.g.
    [select id from Recordtype where Name='recordtype name'].

  • Anuj

    Member
    September 10, 2020 at 1:26 pm in reply to: How can we do partial page refreshes in Salesforce?

    The simplest way to implement a partial page update is to use the reRender attribute on an <apex:commandLink> or <apex:commandButton> tag to identify a component that should be refreshed. When a user clicks the button or link, only the identified component and all of its child components are refreshed.

  • Anuj

    Member
    September 10, 2020 at 1:22 pm in reply to: What are the Global keywords in Salesforce?

    Global variables are defined as a special type of merge fields provided by the Salesforce referencing the data in your organization. These are used to access and display the user and organization information, perform standard actions on records such as creation, deletion etc.

  • Anuj

    Member
    September 9, 2020 at 12:38 pm in reply to: What are the limitations of Apex Metadata API?

    Although there's a lot you can do with Apex Metadata API, there are some limitations to keep in mind. In the current release, we support only two metadata types: page layouts and the records of custom metadata types. Reading, creating, and updating metadata are supported, but deleting metadata is not supported.

  • Anuj

    Member
    September 9, 2020 at 12:36 pm in reply to: How to test a metadata container in Salesforce?

    Test Your Deployment Container

    1. Open the Developer Console by clicking the Setup gear, then Developer Console.
    2. In the Developer Console, click File | New | Apex Class.
    3. Name the class DeploymentTest and click OK.
    4. Get rid of any existing code, and copy and paste the following example code in its place.
  • Anuj

    Member
    September 9, 2020 at 12:28 pm in reply to: What is the difference between the Tooling API and Metadata in Salesforce?

    Use Tooling API when you need fine-grained access to an org's metadata. Tooling API's SOQL capabilities for many metadata types allow you to retrieve smaller pieces of metadata. ... Because Tooling API allows you to change just one element within a complex type, it can be easier to use than Metadata API.

  • Anuj

    Member
    September 8, 2020 at 2:14 pm in reply to: How should you test a metadata deployment request in Salesforce?

    Test Your Deployment Container

    1. Open the Developer Console by clicking the Setup gear, then Developer Console.
    2. In the Developer Console, click File | New | Apex Class.
    3. Name the class DeploymentTest and click OK.
    4. Get rid of any existing code, and copy and paste the following example code in its place.
  • Anuj

    Member
    September 8, 2020 at 2:11 pm in reply to: What are bound expression in Lightning Component in Salesforce?

    Bound Expression: Bound Expression is represented as {! v. str}. Whenever the value of the string is changed, this expression will reflect the change and also affect the components where it is used, we can say the value change dynamically through this expression.

  • Anuj

    Member
    September 8, 2020 at 2:06 pm in reply to: Where is path setting used in Salesforce?

    Salesforce Path is a visualization tool, used on objects, to help guide users along a Path to a final destination. Path is only available in Salesforce Lightning. ... Tips, links, and best practices are examples of what can be provided in the Path set-up (Salesforce is looking to add more key fields in the future).

  • Anuj

    Member
    September 7, 2020 at 1:54 pm in reply to: How do I convert a list to a map in Salesforce?

    Converting List to Map:

    1. //Converting list to map.
    2. Map<Id, Lead> mapFromList = new Map<Id, Lead>(leadList);
  • Anuj

    Member
    September 7, 2020 at 1:41 pm in reply to: How do I use a map in Apex class?

    You Can use Map in Apex following ways:

    1. Creating a Map: Map<Key,Value> variablename=new Map<Key,Value>(); ...
    2. Different Methods in Map:
    3. put(key, value): It returns the value with given key in the map. ...
    4. clear(): It removes all the key-value mapping pairs from the map.
    5. get(key): ...
    6. keySet(): ...
    7. values(): ...
    8. size():
  • Anuj

    Member
    September 7, 2020 at 1:38 pm in reply to: What is type casting in Salesforce?

    In general, all type information is available at run time. This means that Apex enables casting , that is, a data type of one class can be assigned to a data type of another class, but only if one class is a subclass of the other class. Use casting when you want to convert an object from one data type to another.

  • Anuj

    Member
    September 4, 2020 at 4:02 pm in reply to: When to use System.isScheduled() in Salesforce ?

    When stopTest is executed, all asynchronous processes are run synchronously. If you don't include the System. schedule method within the startTest and stopTest methods, the scheduled job executes at the end of your test method for Apex saved using Salesforce API version 25.0 and later, but not in earlier versions.

  • Anuj

    Member
    September 4, 2020 at 3:59 pm in reply to: How to cover JSON untyped in test class in Salesforce?

    You can not cover directly JSON deserializeUntyped , you have create a mock test class for fake response and test the same in test class.

  • Anuj

    Member
    September 4, 2020 at 3:51 pm in reply to: How to cover POST method in test class in Salesforce?

    You can use the following way to cover Post method.

    `@isTest
    static void testHttpPost() {
    // prepare test-data

    //As Per Best Practice it is important to instantiate the Rest Context
    RestRequest req = new RestRequest();
    RestResponse res = new RestResponse();
    req.requestURI = '/services/apexrest/Something'; //Request URL
    req.httpMethod = 'POST';

    RestContext.request = req;
    RestContext.response= res;

    Test.startTest();
    String actual = null;//HttpClass.updateCustomObject();
    Test.stopTest();

    System.assertEquals('expected value', actual, 'Value is incorrect');
    }`

  • Anuj

    Member
    September 3, 2020 at 3:06 pm in reply to: What is the difference between Put and Post Http Method in Salesforce ?

    PUT is used to send data to a server to create/update a resource. The difference between POST and PUT is that PUT requests are idempotent. ... In contrast, calling a POST request repeatedly have side effects of creating the same resource multiple times.

  • Anuj

    Member
    September 3, 2020 at 3:03 pm in reply to: What is the use of @namespaceAccessible Annotation in Salesforce ?

    This annotation provides enhanced support for accessing interfaces, properties, and abstract classes in second-generation packages.

  • Anuj

    Member
    September 3, 2020 at 3:02 pm in reply to: How to send Custom Notifications in Salesforce ?

    Create a Notification Type

    1. Enter Notification Builder in the Quick Find box in Setup, then select Custom Notifications.
    2. Click New and add your Custom Notification Name and API Name, and supported channels. Desktop. ...
    3. Save your notification type.
    4. If you enable the mobile channel, you must enable the supported apps for your notification type.
  • Anuj

    Member
    September 2, 2020 at 4:53 pm in reply to: How to use Google Tag Manager in Salesforce?

    Turn on preview mode in Google Tag Manager
    Remain logged into your Google Tag Manager account and leave that tab open with preview mode on. Ensure that you execute the configuration steps for both Google Tag Manager and Salesforce within the same tab set / browser session. You will need this soon.

  • Anuj

    Member
    September 2, 2020 at 4:51 pm in reply to: How to enable Communities in Salesforce?

    Enable Salesforce Communities

    1. From Setup, enter Communities Settings in the Quick Find box, then select Communities Settings. ...
    2. Select Enable communities.
    3. Select a domain name for your communities, and click Check Availability to make sure that it's not already in use. ...
    4. Click Save.
  • Anuj

    Member
    September 2, 2020 at 4:50 pm in reply to: Can we disable communities after enabling it in Salesforce org?

    Note After you enable Communities, you can't disable it. If your org's access to Communities is suspended for non-payment, all your communities are deactivated, including the communities in Preview. When Communities is reenabled, all communities are inactive.

  • Anuj

    Member
    September 1, 2020 at 2:33 pm in reply to: Why external data important in Salesforce ?

    External data — from outside your own company — is important to your data warehouse for one simple reason: To ensure that you make the right business decisions, you need to see the big picture, which usually means you can't find all the answers stored in your company's various computer applications and databases.

  • Anuj

    Member
    September 1, 2020 at 2:17 pm in reply to: What is System Data Sources in Salesforce ?

    Files Connect uses external data sources to access third-party content systems. External data sources have associated external objects, which your users and the Lightning platform use to interact with the external data and content.

Page 4 of 19