Parul
IndividualForum Replies Created
-
Parul
MemberSeptember 9, 2018 at 6:51 pm in reply to: What is the use of writing sharing rules in Salesforce?Sharing rules are used by administrators to automatically grant users within a given group or role access to records owned by a specific group of users. Sharing rules cannot be added to a package and cannot be used to support sharing logic for apps installed from Force.com AppExchange.
Sharing rules can be based on record ownership or other criteria. You can’t use Apex to create criteria-based sharing rules. Also, criteria-based sharing cannot be tested using Apex.
Steps to Create Sharing Rules
Step 1: Create a public group which will have the users who need specific access. Go to the link path, Setup home → Users → Public Groups → New Group.
Step 2:
Now we create the sharing rule for the above public group. Go to the link path Setup Home → Security → Sharing settings. From the dropdown of Manage Sharing settings for, choose Campaigns.Then under Campaign sharing rules, click on the button New. Provide the details for the new sharing rule as shown below. We select a criteria to give access to records for which the value of the field Campaign name is camp_x.
Thanks.
-
Parul
MemberSeptember 9, 2018 at 6:47 pm in reply to: How many roll-up summary fields can be created in Salesforce?A roll-up summary field calculates values from related records, such as those in a related list. You can create a roll-up summary field to display a value in a master record based on the values of fields in a detail record.
The types of fields you can calculate in a roll-up summary field depend on the type of calculation. For example,Number, currency, and percent fields are available when you select SUM as the roll-up type.
Number, currency, percent, date, and date/time fields are available when you select MIN or MAX as the roll-up type.You can add 25 roll-up summary fields per objects in salesforce.
-
Parul
MemberSeptember 9, 2018 at 6:27 pm in reply to: What are the uses of custom labels in Salesforce?Hello Chanchal
Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values can be translated into any language Salesforce supports. Custom labels enable developers to create multilingual applications by automatically presenting information (for example, help text or error messages) in a user’s native language.
You can create up to 5,000 custom labels for your organization, and they can be up to 1,000 characters in length.To access custom labels, Go To Setup — Create — Custom Labels. Click on New Custom Labels.Enter value for name, value and description. We can use custom label name to access custom label value in apex code using System.Label.labelName
The advantage of using custom label is that label will be displayed to user depending on their language automatically.
Thanks.
-
Parul
MemberSeptember 9, 2018 at 6:10 pm in reply to: Is there a way to undo the changes in the domain name in Salesforce ?Hi Anurag
Support organization has the ability to change the force.com domain name with the proper validation. You can log a case. Keep in mind any domain name change might take up to 24 hours to be effective and the old domain name won't be valid.
You may reach Salesforce support.
Thanks.
-
Hi Anurag,
Deactivate (Delete) Users. You can't delete a user, but you can deactivate an account so a user can no longer log in to Salesforce.
Follow these steps:
- From Setup, enter Users in the Quick Find box, then select Users.
- Click Edit next to a user’s name.
- Deselect the Active checkbox and then click Save.
Thanks
-
Parul
MemberSeptember 9, 2018 at 5:53 pm in reply to: What is the difference between governor and execution limits in Salesforce?Hi Anurag,
If governor limit is exceeded, a run-time exception that can’t be handled is thrown. By following best practices in your code, you can avoid hitting these limits.
Execution limits ensure the efficient use of resources on the Lightning Platform multitenant platform. Most of the governor and execution limits are per transaction, and some aren't, such as 24-hour limits.
-
Parul
MemberSeptember 8, 2018 at 6:21 am in reply to: Can we edit a scheduled job in Salesforce Apex?Hi Sanjana,
Existing Apex scheduled jobs are not editable. A simple change like updating the frequency means you have to delete the old one, and then create a new one.
Scheduling frequency details that you enter when creating a scheduling job do not show up in Scheduled Job page. This makes it difficult to know how these were setup.
Thanks.
-
Parul
MemberSeptember 7, 2018 at 6:26 pm in reply to: What is the difference between future apex and batch apex in Salesforce?Hi Anurag,
Batch Apex:
Batch apex allows you to define a job that can be divided into manageable chunks, where each chunk can be proceed separately.
In batch apex, it will fetch all records which you want perform the field update and divide them into list of 200 records and every 200 records operation is performed separately.
Batch Apex is exposed as an interface that must be implemented by the developer. Batch jobs can be programmatically invoked at runtime using Apex.
Batch jobs can also be programmatically scheduled to run at specific times using the Apex Scheduler, or scheduled using the Schedule Apex page in the Salesforce user interface.
Batch Apex is used to separate tasks that are going to handle more records(complex long running jobs) in background process. Batch Apex also runs asynchronously.
If Batch Apex is not used for handling bulk records, we will hit governor limits set by Salesforce.com.Future Annotation: @future
Future Annotation is used to separate methods that are to be executed asynchronously.
If Future Annotation is not used in a web service callout, the thread will wait until the response comes and other processes will not be executed.Thanks.
-
Hi Chanchal,
The benefit of bulkifying your code is that bulkified code can process large numbers of records efficiently and run within governor limits on the Lightning Platform. These governor limits are in place to ensure that runaway code doesn’t monopolize resources on the multitenant platform.
The term bulkifying Apex code refers to the concept of making sure the code properly handles more than one record at a time. When a batch of records initiate Apex, a single instance of that Apex code is executed, but it needs to handle all of the records in that given batch.
Apex triggers are optimized to operate in bulk. We recommend using bulk design patterns for processing records in triggers.
For example:
trigger InsertContact on Contact(before insert) {
List<Contact> contactsList=new List<Contact>();
for(Contact conlist: Trigger.new){
conlist.name='Parul';
contactsList.add(conlist);
}
insert contactsList;
}
Thanks.
-
Parul
MemberSeptember 7, 2018 at 6:10 pm in reply to: Can Boolean value be Null or not in Salesforce?Hi Shradha,
Apex: Booleans can be null, unless you instantiated the Boolean to a true/false, you must check for null before checking whether it’s true or false.
Thanks.
-
Parul
MemberSeptember 7, 2018 at 6:05 pm in reply to: How to add javascript remoting to a Salesforce visualforce page?Hello Avnish,
To use javascript remoting in a Visualforce page use Romote objecst or @RemoteAction in Visualforce page to insert record in Salesforce.
Thanks.
-
Parul
MemberSeptember 7, 2018 at 5:43 pm in reply to: Is it possible to generate pdf in Salesforce lightning?Hi Shaik,
Yes, it is possible to generate pdf in Salesforce Lightning.
Follow these steps:
- Create Lightning component to accept an external method and invoke it on button click
- Embed Lightning component within Visualforce Page
- Passing in-memory data within the lightning component to VF Page Controller
- Generating PDF
If you are facing problem to implement this you can refer my blog.
Hope this will help you.
Thanks.
-
Parul
MemberSeptember 7, 2018 at 5:25 pm in reply to: Is it necessary to use Apex Tags while constructing a Salesforce Visualforce page?No, it's not necessary you can use HTML tags instead of apex tag while constructing but it is compulsory to use HTML tags inside <apex:page>tag.
For example:
<apex:page showHeader="false" standardStylesheets="false" sidebar="false">
<apex:form>
<h1>Show/Hide HTML form Visualforce Example</h1><head>
<title>Test</title>
</head>
<div>
This content will not be toggled.
</div>
<apex:commandbutton value="Save Content" action="{!Save}"></apex:commandbutton>
</apex:form>
</apex:page>Thanks.
-
Hi Madhulika,
The URL that a user’s browser is redirected to after successful authentication. As this URL is used for some OAuth flows to pass an access token, the URL must use secure HTTP (HTTPS) or a custom URI scheme. Separate multiple callback URLs with line breaks. The callback URL field has a limit of 2000 characters, cumulatively. If you enter several URLs and they exceed this limit, configure another connected app to manage more callback URLs.
Thanks.
-
Use change sets to send customizations from one Salesforce org to another. For example, you can create and test a new object in a sandbox org, then send it to your production org using a change set. Change sets can only contain modifications you can make through the Setup menu. For example, you can’t use a change set to upload a list of contact records. Change sets contain information about the org. They don’t contain data, such as records.
Change sets make deploying changes easier.
- Change sets represent sets of customizations in your org (or metadata components) that you can deploy to a connected org. Use change sets as a point-and-click tool to migrate your customizations.
- There’s no need to download files to a local file system. Other deployment methods require you to work with local files.
- The change set tool helps you discover and include dependent components. For example, a new custom field can’t be migrated if the custom object it belongs to doesn’t exist in the target org.
- You define the set of components once. You can reuse the same set of components for another deployment by cloning the change set. Cloning change sets is helpful during the iterative phases of a project.
Deploying with change sets involves the following steps:
- Authorize deployment connections.
- Create outbound change set in sandbox.
- Upload from sandbox to production.
- Review inbound change and deploy!
Thanks.
-
Hi Shradha,
When Salesforce engages matching rules and determines actions to take as it encounters duplicates.Depending on how you configure Duplicate Management, sales reps see an alert that they’re about to create a duplicate. Or your reps are blocked from creating the duplicate altogether.
If your company started using Salesforce in Spring ’15 or later, we give you standard duplicate rules for business accounts, contacts, leads, and person accounts. If your company started using Salesforce in Winter ’15 or earlier, like Maria, you create the rules on your own, which is easy.
A duplicate rule defines what happens when a user views a record with duplicates or starts creating a duplicate record. Salesforce provides standard duplicate rules for business and person accounts, contacts, and leads. You can also create duplicate rules.
You manage matching rules and duplicate rules from Setup.
Thanks.
-
Hi Shradha,
Maintaining clean and accurate data is one of the most important things you can do to help your organization get the most out of Salesforce, so we’re excited to introduce Data.com Duplicate Management. Now you can control whether and when you allow users to create duplicate records inside Salesforce; customize the logic that’s used to identify duplicates; and create reports on the duplicates you do allow users to save.
Duplicate Management helps you and your sales teams quickly and easily manage duplicates for Business accounts
Contacts
Leads
Person accounts
Records created from custom objects
It’s highly configurable, and offers you far more than just exact detection and matching logic.Our standard matching detects potential duplicate records based on exact matches, such as two contacts with the same name, Margaret Chan.
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions
Thanks.
-
Hi Madhulika,
- Use cross filters to include or exclude records in your report results based on related objects and their fields.
- Use cross filters to filter a report by an object's child objects using WITH conditions. For example, filter a report to show just accounts with cases.
- Here you can have data displayed from the parent and/or child object influenced by related criteria from another object – on this Venn diagram that would be the various intersections (but you can’t display data that is just on the other child object). n.b. The objects do have to be related!
What reports with Cross filter can do:
- Define a filter to only show parent record that have a related child record.
- Define a filter to only show parent record that don't have a related child record.
Thanks.
- This reply was modified 6 years, 2 months ago by Parul.
-
Parul
MemberSeptember 7, 2018 at 1:44 pm in reply to: Can we create multiple records using process builder in Salesforce?Hi,
yes, you can create multiple records using process builder follow these steps:
Go to process builder, create new process.
Add object -> select "Contact".
Start the process -> "When a record is created or edited"Add Criteria
Set Criteria Name (to check for new record)
Criteria for Executing Actions -> "Formula Evaluates to true"
Function -> Logical -> ISNEW()
SaveImmediate Action (if true)
Create record, select Fee__c -> assign values to all appropraite fields (either prefixed values or reference values from newly created contact record)If first condition is false
Add Another criteria ( to check if Semester__c is changed or not)
Set Criteria Name (to check for updated field)
Criteria for Executing Actions -> "Formula Evaluates to true"
Function -> Logical -> ISCHANGED()
replace "field" with "Semester__c"
saveImmediate Action (if true)
Create record, select Fee__c -> assign values to all appropraite fields (either prefixed values of reference values from newly created contact record)Save
Thanks.
-
Hi Anjali,
Follow these steps:
Use the Developer Console Query Editor and update the names of the Lightning Components to see what happens. Run this query in the Query Editor:
- Select Id, DeveloperName from AuraDefinitionBundle
then let's change the name of the component.
For example: TestLighntingBaseComponents to CodeScienceLightningBaseComponents and hit save.
Thanks.
-
Parul
MemberSeptember 7, 2018 at 12:54 pm in reply to: Explain the difference between a custom button and a custom link.Hi Anjali,
Custom Link:
- Custom links can link to an external URL, such as www.google.com, a Visualforce page, or your company’s intranet.
- Custom links can also link to a custom s-control in the custom s-control library, such as a Java applet or Active-X control.
Custom Button:
- Connect users to external applications, such as a web page that displays a map to a contact’s address.
- Run an s-control from the s-control library, such as an s-control that escalates a case from the case detail page.
- Launch custom links.
Thanks.
-
Hi Anjali,
Analytical snapshot is “allowing you to load data from a Custom Report to a Custom Object on a regularly scheduled basis.” This in turn allows you to create Reports and Dashboards based on the data in the Custom Object.
Analytic Snapshots are comprised of three things:
A source Report of type Tabular or Summary
A Custom Object with fields matching the columns in the source Report
An Analytic Snapshot definition, which maps fields and schedules the snapshot runsTHanks.
-
Hi Ajit
To Check whether any field is "groupable" or not,Please follow the below procedure
Schema.DescribeFieldResult fieldDescribe = ObjectName.FieldName.getDescribe();
if(fieldDescribe.groupable == true){
Then Our Field is Groupable
}
Thanks
-
Parul
MemberSeptember 7, 2018 at 11:08 am in reply to: How can i use same SOQL script for both before and after triggers that are run on same object?Hi Audrey,
There is different DML operations i.e. Insert,Update,Delete on which any Trigger is fire,Out of these only for UPDATE we can write same SOQL for before and after Trigger.
trigger checksameQuery on Lead (before update, after update) {
List<Lead> listofLead = [Select id,FirstName,LastName from Lead where id =: Trigger.new];
for(Lead leadObject : listofLead){
if(Trigger.isBefore && Trigger.isupdate){
System.debug('leadObject>>>>>>'+leadObject.FirstName);
}
if(Trigger.isAfter && Trigger.isupdate){
System.debug('leadObject>>>>>>'+leadObject.FirstName);
}
}
}In case of other INSERT DML we can use Trigger.New for both before and After Trigger
rigger checksameQuery on Lead (before insert, after insert) {
for(Lead leadObject : Trigger.New){
if(Trigger.isBefore ){
System.debug('leadObject>>>>>>'+leadObject.FirstName);
}
if(Trigger.isAfter ){
System.debug('leadObject>>>>>>'+leadObject.FirstName);
}
}
}Thanks
-
Parul
MemberSeptember 7, 2018 at 9:12 am in reply to: What is the correct and efficient way to get the Name of the OwnerId of a Case Object?Hi karen,
Use the SOQL query to get owner name from case records:
SELECT id, Owner.Username FROM Case
Thanks.