Piyush
IndividualForum Replies Created
-
Piyush
MemberNovember 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.
-
Piyush
MemberNovember 11, 2019 at 10:02 am in reply to: i am unable to display a toast message modal in lightning application ,what is the reason?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/
-
Piyush
MemberNovember 11, 2019 at 9:56 am in reply to: can we display rich text field image values on a visualforce page in Salesforce?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>
-
Piyush
MemberNovember 11, 2019 at 5:46 am in reply to: How to write a test class for Attachment, Messaging, Content Version Objects in Salesforce?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
-
Piyush
MemberNovember 8, 2019 at 4:08 am in reply to: How do I support scrolling and lock/freeze the header row of a pageBlockTable in salesforce?Hi,
AS per my knowledge, you can create the effect you are looking for using CSS and jQuery.
-
Piyush
MemberNovember 8, 2019 at 4:05 am in reply to: How to Insert/Update multiple records in a single Force.com REST API call in salesforce?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
MemberNovember 8, 2019 at 3:59 am in reply to: How can we create a community user in Salesforce?Hi,
- 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. - Enable the contact and the contact’s related account as external partner users.
- 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 - 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.
- Assign a role to the owner of the contact record.From Setup, enter user in Quick Find, then select Users > Users.
-
Piyush
MemberNovember 8, 2019 at 2:56 am in reply to: What describes the capabilities of salesforce knowledge?Hi,
- Knowledge allows an organization to share articles with partner portal users.
- Knowledge uses data categories and roles to make articles visible to specific users.
-
Piyush
MemberNovember 6, 2019 at 6:07 am in reply to: How can we set-up recurring time-based workflow actions in the Salesforce platform ?Hi,
For the time-based workflow actions, you need to first create:-
- Creating an Email Template. (Setup->Communication Templates->Classic Email Templates)
- Creating an Email Alert. (Setup->Build->Create->Workflow & Approvals-> Email Alerts)
- Creating a Workflow. (setup->Build->Create->Workflow & Approvals->Workflow Rules)
-
Piyush
MemberNovember 6, 2019 at 6:01 am in reply to: Is it possible to restrict permission for users using permission set in salesforce?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.
-
Piyush
MemberNovember 6, 2019 at 5:53 am in reply to: What are the implications of implementing Database.Stateful in Salesforce?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
MemberNovember 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.
-
Piyush
MemberNovember 5, 2019 at 6:08 am in reply to: Why can't we edit standard Community profile in Profiles in Salesforce?Hi,
- Go to customize
- User interface
- Uncheck the check box "Enable Enhanced Profile User Interface"
- Save to change the view to get edit link next to your profile names.
-
Piyush
MemberNovember 5, 2019 at 6:00 am in reply to: How can i create a checkbox to select all the below checkbox in salesforce lightning component?Hi,
- Each of the checkboxes just needs to be given the same name.
- The ‘Select All’ checkbox needs to have an onchange event, and be bound to an aura attribute, which holds the current status.
- The onchange event first needs to change the aura attribute to be the opposite of its current value.
- Do a component.find(‘checkboxname’), and you’ll receive an array of the components which you can then…
- Loop through to set the checked value.
For more refer to:- https://www.sfdcpaul.com/lightning-checkboxes-select-all/
-
Piyush
MemberNovember 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.
-
Piyush
MemberNovember 1, 2019 at 7:42 am in reply to: Is there any governor limit over how many users we can create in Salesforce?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
MemberNovember 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:-
- Click Field Dependencies
- Choose a controlling field and dependent field
- Click Continue
- Use the field dependency matrix to specify the dependent picklist values that are available when a user selects each controlling field value.
- 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.
- Click Save
-
Piyush
MemberNovember 1, 2019 at 4:57 am in reply to: How to display an image in lightning component through static resource in Salesforce?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>
-
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
-
Hi Nikita,
The Math.ceil() function always rounds a number up to the next largest whole number or integer.
-
Piyush
MemberOctober 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.
-
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.
-
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.
-
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.
-
Hi,
To create the record in lightning web component:-
syntax:-
import { createRecord } from 'lightning/uiRecordApi'; createRecord(recordInput: Record): Promise<Record>