Forum Replies Created

Page 4 of 10
  • Piyush

    Member
    November 11, 2019 at 1:31 pm in reply to: What are External ID fields used for in Salesforce?

    Hi,

    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.

  • Hi,

    <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
        <div>
            <lightning:button label="Information"
                              variant="brand"
                              onclick="{!c.showInfoToast}"
                              >
            </lightning:button>
            <lightning:button label="Error"
                              variant="destructive"
                              onclick="{!c.showErrorToast}">
            </lightning:button>
            <lightning:button label="Warning"
                              variant="inverse"
                              onclick="{!c.showWarningToast}"
                              class="wk_warning">
            </lightning:button>
            <lightning:button label="Success"
                              variant="inverse"
                              onclick="{!c.showSuccessToast}"
                              class = "wk_success">
            </lightning:button>
        </div>
    </aura:component>

    for more you can take help from https://webkul.com/blog/forceshowtoast-in-lightning/

  • Hi,

    Yes,  you can display rich text field image values on a vf page:-

    <apex:pageBlockTable value="{!con}" style="width:1200px;" var="c" rendered="{!if(showPB==true,true,false)}" border="2" title="Some Name">
    <apex:column>
      <apex:facet name="header">Snapshot</apex:facet>
      <apex:outputText value="{!c.snapshot__c}" escape="false"/>
    </apex:column></apex:pageBlockTable>

     

  • Hi Prachi,

    To write a test class for Attachment, Messaging, Content Version Objects in salesforce you can take help from the following example:-

    @isTest 
    public class AttClassTest 
    {
        static testMethod void testEx1() 
        {
            Account testAccount = new Account();
            testAccount.Name='Test Account' ;
            insert testAccount;
            
            Contact cont = new Contact ();
            cont.FirstName = 'FirstName';
            cont.LastName = 'LastName';
            cont.Email='[email protected]';
            cont.phone='12345678';
            insert cont;
            
            Account acct = new Account(Name='TEST_ACCT');
            insert acct;
            
            ContentVersion contentVersion = new ContentVersion(
                Title = 'Penguins',
                PathOnClient = 'Penguins.jpg',
                VersionData = Blob.valueOf('Test Content'),
                IsMajorVersion = true
            );
            insert contentVersion;    
            List<ContentDocument> documents = [SELECT Id, Title, LatestPublishedVersionId FROM ContentDocument];
            
            //create ContentDocumentLink  record 
            ContentDocumentLink cdl = New ContentDocumentLink();
            cdl.LinkedEntityId = acct.id;
            cdl.ContentDocumentId = documents[0].Id;
            cdl.shareType = 'V';
            insert cdl;
            
            System.Test.StartTest(); 
          <b>  PageReference pageRef = Page.aaaaaaaaaa; // Add your VF page Name here</b>
            pageRef.getParameters().put('Id', String.valueOf(acct.Id));
            System.Test.setCurrentPage(pageRef);
            AttClass cls = new AttClass();
            cls.Body =Blob.valueOf('Test Content') ; 
            cls.Name='Test' ;
            cls.save();
            AttClass.createContentVersion('Test',Blob.valueOf('Test Content'));
            AttClass.createContentLink(contentVersion.Id , acct.Id);
            cls.contentId =null ;
            cls.save();
            System.Test.StopTest();
        }
        
        
    }

    for more take help from https://developer.salesforce.com/forums/?id=9060G0000005ooMQAQ

     

  • Hi,

    AS per my knowledge, you can create the effect you are looking for using CSS and jQuery.

  • Hi Deepak,

    As per my knowledge, You can't insert multiple rows in a single call in the rest api, you need to use the bulk api.

  • Piyush

    Member
    November 8, 2019 at 3:59 am in reply to: How can we create a community user in Salesforce?

    Hi,

    1. Assign a role to the owner of the contact record.From Setup, enter user in Quick Find, then select Users > Users.
      a.Next to the owner of the contact record, click Edit.
      b.From the General Information section, select a role, such as CEO.
      c.Save your changes.
    2. Enable the contact and the contact’s related account as external partner users.
    3. From the contact record page, click the account name in Related Accounts.
      Select Manage External User > Enable User
      From the New User page, in the General Information section, select the following:User LicenseClient Customer Community
      Client Customer Community Plus
      Client Customer Community Login
      Client Customer Community Plus Login
      ProfileClient Customer Community
      Client Customer Community Plus
      Client Customer Community Login
      Client Customer Community Plus Login
      Save your changes.
      From the contact record page, select Manage External User > Enable User
      From the New User page, in the General Information section, select the following:User LicenseClient Customer Community
      Client Customer Community Plus
      Client Customer Community Login
      Client Customer Community Plus Login
      ProfileClient Customer Community
      Client Customer Community Plus
      Client Customer Community Login
      Client Customer Community Plus Login
      Save your changes
    4. Assign a permission set:From the contact’s user page, click Permission Set Assignments and then click Edit Assignments.
      From Available Permission Sets, select Customer Community Read Only and then click Add.
      Save your changes.
  • Piyush

    Member
    November 8, 2019 at 2:56 am in reply to: What describes the capabilities of salesforce knowledge?

    Hi,

    1. Knowledge allows an organization to share articles with partner portal users.
    2. Knowledge uses data categories and roles to make articles visible to specific users.
  • Hi,

    For the time-based workflow actions, you need to first create:-

    1. Creating an Email Template. (Setup->Communication Templates->Classic Email Templates)
    2. Creating an Email Alert. (Setup->Build->Create->Workflow & Approvals-> Email Alerts)
    3. Creating a Workflow. (setup->Build->Create->Workflow & Approvals->Workflow Rules)
  • Hi Prachi,

    Yes, it is possible to restrict permission for users using permission set in salesforce. It's easy to manage users' permissions and access with permission sets because you can assign multiple permission sets to a single user. In some cases, you may want users to have access to an object, but limit their access to individual fields in that object.

  • Hi,

    Database.Stateful  is used for keeping state of variable while execution of batch class. The only time you need Database.Stateful is when the execute method modifies a class variable in a way meant to be used across multiple execute methods or in the finish method. The majority of batches you will ever write will not need Database.Stateful. It's important to know that using Database.Stateful will harm your batch's performance, because the class will be serialized at the end of each execute method to update its internal state. This extra serialization results in longer execution time.

  • Piyush

    Member
    November 5, 2019 at 6:16 am in reply to: What is use of email opt out feature in Salesforce MC?

    Hi,

    The Email Opt Out field will allow you to exclude marked contacts from mass e-mail. To utilize this feature, you first need to make sure this field is visible (to profiles) and also add the field to both your Contact Page Layout and Lead Page Layout if it is not already added.

  • Hi,

    1. Go to customize
    2. User interface
    3. Uncheck the check box "Enable Enhanced Profile User Interface"
    4. Save  to change the view to get edit link next to your profile names.
  • Hi,

    1. Each of the checkboxes just needs to be given the same name.
    2. The ‘Select All’ checkbox needs to have an onchange event, and be bound to an aura attribute, which holds the current status.
    3. The onchange event first needs to change the aura attribute to be the opposite of its current value.
    4. Do a component.find(‘checkboxname’), and you’ll receive an array of the components which you can then…
    5. Loop through to set the checked value.

    For more refer to:- https://www.sfdcpaul.com/lightning-checkboxes-select-all/

  • Piyush

    Member
    November 5, 2019 at 5:56 am in reply to: What is the use of aura:id in Salesforce lightning component?

    Hi,

    aura:id is a local id. A local ID is an ID that is only scoped to the component. A local ID is often unique but it’s not required to be unique.

    Ex.-<lightning:button aura:id="button1" label="button1"/>

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

    Yes, Salesforce had given the governer limit of 10 to create users. But you can active 2 at a time other will be deactivate.

  • Piyush

    Member
    November 1, 2019 at 5:06 am in reply to: How to restrict Pick List values in Salesforce?

    Hi Reji,

    As per my knowledge you should use the Field Dependencies on case object:-

    1. Click Field Dependencies
    2. Choose a controlling field and dependent field
    3. Click Continue
    4. Use the field dependency matrix to specify the dependent picklist values that are available when a user selects each controlling field value.
    5. Optionally, click Preview to test your selections. If your organization uses record types, choose a record type to test how it affects your controlling and dependent picklist values. The record type controls what values are available in the controlling field. The record type and the controlling field together determine what values are available in the dependent picklist. For example, a dependent value is only available if it is available in the selected record type and the selected controlling value.
    6. Click Save
  • Hi Heena,

    You can try this for help to display image in lightning component through static resource  :-

    <aura:component implements="flexipage:availableForAllPageTypes" access="global" >
    	<img src="{!$Resource.StaticResourceName}"/>
    </aura:component>

     

     

  • Piyush

    Member
    October 22, 2019 at 6:17 am in reply to: How to create a Lightning Email Template?

    Hi,

    Use email templates to increase productivity and ensure consistent messaging. Email templates with merge fields let you quickly send emails that include field data from Salesforce records.

    To create Email template : https://help.salesforce.com/articleView?id=email_create_a_template.htm&type=5

  • Piyush

    Member
    October 22, 2019 at 6:14 am in reply to: What is the use of Math.ceil ?

    Hi Nikita,

    The Math.ceil() function always rounds a number up to the next largest whole number or integer.

  • Piyush

    Member
    October 21, 2019 at 4:23 am in reply to: In which report formates conditional highlighting can be used?

    Hi Yogesh,

    As per my knowledge summary and  matrix reports can be used for conditional highlighting.

  • Piyush

    Member
    October 21, 2019 at 4:20 am in reply to: What is the use of UITheme? 

    Hi,

    UITheme returns the look and feel the user is supposed to see, while $User.UIThemeDisplayed returns the look and feel the user actually sees. For example, a user may have the preference and permissions to see the Lightning Experience look and feel, but if they are using a browser that doesn’t support that look and feel, for example, older versions of Internet Explorer, $User.UIThemeDisplayed returns a different value.

  • Piyush

    Member
    October 21, 2019 at 4:16 am in reply to: What is Site ?

    Hi Saddam,

    In Context to Salesforce, Salesforce Sites enables you to create public websites and applications that are directly integrated with your Salesforce organization—without requiring users to log in with a username and password. You can publicly expose any information stored in your organization through a branded URL of your choice, and make the site's pages match the look and feel of your company’s brand.

  • Piyush

    Member
    October 18, 2019 at 5:12 am in reply to: How to Create MultipickList in LWC?

    Hi Saddam,

    You can check my blog to create a multi-select picklist.

    Here i am sharing the link of the blog. https://www.forcetalks.com/blog/creating-a-multi-select-picklist-as-checkbox-in-salesforce-visualforce-pages/

    • This reply was modified 5 years, 1 month ago by  Piyush.
  • Piyush

    Member
    October 18, 2019 at 5:07 am in reply to: How to Create Record in LWC?

    Hi,

    To create the record in lightning web component:-

    syntax:-

    import { createRecord } from 'lightning/uiRecordApi';
    createRecord(recordInput: Record): Promise<Record>

     

Page 4 of 10