Parul
IndividualForum Replies Created
-
Parul
MemberSeptember 22, 2018 at 5:58 pm in reply to: How to declare Salesforce Visualforce Page as HTML5?the declaration visualforce page as: <apex:page docType=”html-5.0″ />
-
Parul
MemberSeptember 22, 2018 at 5:56 pm in reply to: What are Common Salesforce Apex Page Attributes?<!-- Page: -->
<apex:page renderAs="pdf">
<style> body { font-family: 'Arial Unicode MS'; } </style>
<h1>Congratulations</h1>
<p>This is your new PDF</p>
</apex:page> -
Parul
MemberSeptember 22, 2018 at 5:56 pm in reply to: Which component in Salesforce ends with “__mdt” and “__s”?‘__s’ is used for geolocation services and ‘__mdt’ is used for custom metadata types
-
Parul
MemberSeptember 22, 2018 at 5:55 pm in reply to: How to declare Salesforce Visualforce Page as HTML5?There is a docType attribute in <apex:page> component you can set that to html-5.0
For Example
<apex:page docType="html-5.0" />
-
Parul
MemberSeptember 22, 2018 at 5:55 pm in reply to: How to refer static resources in Salesforce Visualforce? -
Custom Metadata Type let you use records to configure your app without worrying about migrating those records to other orgs. You can deploy the records of custom metadata types from a sandbox with change sets or packaged in managed packages instead of transferring them manually.
With Custom Metadata Types, you can customize, deploy, package, and upgrade application metadata that you design yourself.
When you create Custom Metadata Type, you also create custom fields on that type. Custom meta data support below field types.
-
Parul
MemberSeptember 22, 2018 at 5:54 pm in reply to: What the Concurrent Request Limit is and Why it Exists in Salesforce?If Synchronous Apex runs more than 5 sec it considered as long running job. And we have limit that only 10 long running job can execute at a time. So, whenever 11th Synchronous apex tries to execute, it gets Concurrent Apex limit error
-
Parul
MemberSeptember 22, 2018 at 5:53 pm in reply to: What causes Concurrent Apex limit error in Salesforce?The multi tenant Force.com platform uses governor limits to ensure that system resources are available to all customers and to prevent any one customer from monopolizing them. If a governor limit is exceeded, the associated execution governor limit issues a runtime exception that cannot be handled. When you design your applications, you can help plan for their growth by keeping these limits in mind.
One of the limits customers frequently reach is the concurrent request limit. Once a synchronous Apex request runs longer than 5 seconds, it begins counting against this limit. Each organisation is allowed 10 concurrent long-running requests. If the limit is reached, any new synchronous Apex request results in a runtime exception. This behavior occurs until the organization’s requests are below the limit.
Ultimately, this limit is in place to protect the user experience. Once the limit is reached, new synchronous Apex requests are denied. This behaviour can be disruptive to your work.
-
Parul
MemberSeptember 22, 2018 at 5:52 pm in reply to: How to capture errors after using Database DML methods in Salesforce?List<Account> acs = new List<Account>();
acs.add(new Account());
List<Database.SaveResult> srs = Database.insert(acs, FALSE);
String msg = '';
for(Integer idx = 0; idx < srs.size(); idx++) {
Database.SaveResult sr = srs[idx];
if (!sr.isSuccess()) {
msg += 'Account: ' + acs[idx].Name + ' failed!';
for (Database.Error er : sr.getErrors()) {
msg += 'Error (' + er.getStatusCode() + '):' + er.getMessage();
msg += '\r\n';
}
}
}
System.debug(msg); -
Parul
MemberSeptember 22, 2018 at 5:49 pm in reply to: How to get Salesforce Visualforce page output as JSON?Output Visualforce page as JSON Data:
To output the Visualforce page as JSON Data following point needs to be taken care,
contentType should be “application/x-JavaScript; charset=utf-8” (Note that i have not specified it as json although valid MIME type available for JSON in HTML)
showHeader attribute should be false.
standardStylesheets attribute should be false.
sidebar attribute should be false.
While calling the VF page always specify explicitly that we don’t need Page editor tool of the Salesforce using core.apexpages.devmode.url=0.
Source code for VF:<apex:page controller="GanttChartData" contentType="application/x-JavaScript; charset=utf-8" showHeader="false" standardStylesheets="false" sidebar="false">
{!jsonString}</apex:page>
-
Parul
MemberSeptember 22, 2018 at 5:47 pm in reply to: Difference between Chatter API and Connect API in Salesforce?Use Chatter REST API to:
Build a mobile app.
Integrate a third-party web application with Salesforce so it can notify groups of users about events.
Display a feed on an external system, such as an intranet site, after users are authenticated.
Make feeds actionable and integrated with third-party sites. For example, an app that posts a Chatter item to Twitter whenever the post includes #tweet hashtag.
Create simple games that interact with the feed for notifications.
Creating a custom, branded skin for Chatter for your organization.The ConnectApi namespace (also called Chatter in Apex) provides classes for accessing the same data available in Chatter REST API. Use Chatter in Apex to create custom Chatter experiences in Salesforce.
Thanks
-
Parul
MemberSeptember 22, 2018 at 5:47 pm in reply to: Difference between Chatter API and Connect API in Salesforce?Use Chatter REST API to:
Build a mobile app.
Integrate a third-party web application with Salesforce so it can notify groups of users about events.
Display a feed on an external system, such as an intranet site, after users are authenticated.
Make feeds actionable and integrated with third-party sites. For example, an app that posts a Chatter item to Twitter whenever the post includes #tweet hashtag.
Create simple games that interact with the feed for notifications.
Creating a custom, branded skin for Chatter for your organization.The ConnectApi namespace (also called Chatter in Apex) provides classes for accessing the same data available in Chatter REST API. Use Chatter in Apex to create custom Chatter experiences in Salesforce.
Thanks
-
Parul
MemberSeptember 22, 2018 at 5:46 pm in reply to: Autogenerated Salesforce Id consist of colon, how to handle it in JQuery ?Use double slash “\” in front of colon which will work as escape sequence
var ele = $("#abc\:xyz");
-
Parul
MemberSeptember 22, 2018 at 5:44 pm in reply to: How to return Map result from SOQL query in Salesforce Apex?You can perform this operation by going through this code given below:
//Creating List of all account Ids
List<id> accIdsList = new List<id>() ;//Creating set of all account Ids
Set<id> accIdsSet = new Set<id>() ;//Fetching all accounts
List<account> accList = new List<Account>();//Creating Map with account id as key and account record as value
Map<Id,Account> accountIdObjMap = new Map<Id,Account>([select Id,name,site,rating,AccountNumber from account limit 50000]);//getting list of account using map.values method
accList = accountIdObjMap.values();//getting set of account Id’s using map.keySet method
accIdsSet = accountIdObjMap.keySet();//getting list of account Id’s using list.addAll method
accIdsList.addAll(accIdsSet);To clarify, this method can only be used to generate Maps using Id of the object you are querying as the key. If you want to use a different value as the key, you will have to iterate over the list returned by your query and put values into a Map. For instance, if you wanted to use AccountId as the key, you would need to do something like this: List<Opportunity> oppList = [Select Id, AccountId from Opportunity]; Map<Id,Opportunity> accOppMap = new Map<Id,Opportunity>(); for(Opportunity o : oppList){ accOppMap.put(o.AccountId,o); }
Hope this may help
- This reply was modified 6 years, 2 months ago by Parul.
-
Parul
MemberSeptember 22, 2018 at 5:43 pm in reply to: Which custom fields or relationships in Salesforce ends with “__pc” and “__pr”?In normal scenario all custom fields ends with “__c” and relationships ends with “__r” However for Person accounts, custom fields ends with “__pc” and custom relationship ends with “__pr”.
-
Parul
MemberSeptember 22, 2018 at 5:42 pm in reply to: How to report on User License field in Salesforce?Create a TEXT formula field on the USER object (e.g., SF License)
In the formula section paste the following:
Profile.UserLicense.Name
Save the formula and use SF License in your reports views.
Thanks.
-
Parul
MemberSeptember 22, 2018 at 5:42 pm in reply to: How to report on User License field in Salesforce?Create formula field in User Object with formula “Profile.UserLicense.Name”.
Note: You need to copy and paste this value because it doesn’t show up in the fields drop down. -
Parul
MemberSeptember 22, 2018 at 5:42 pm in reply to: How to query and abort scheduled job using Salesforce Apex?Please run a SOQL query on AsyncApexJob with Status filter. CronTrigger is used to retrive Scheduled jobs wherein AsyncApexJob returns Apex Jobs (Running, Aborted, Pending, Completed etc.)
SOLUTION:
Use Below Code:-
for ( AsyncApexJob aJob : [ Select id ,Status, ApexClass.Name
from AsyncApexJob where Status!='Aborted'
and Status!='Completed' ] ){System.AbortJob(aJob.Id);
}
-
Parul
MemberSeptember 22, 2018 at 5:39 pm in reply to: What may be reason truncate button is not visible on Custom Object in Salesforce?You will see your profile details (quite a long page with lots of information). We need "Field-Level Security" area (because of our element-type "Custom Field"). Now find the object name your new custom field belongs to and click on the link "[ View ]". You will be redirected to another page with all custom fields of the custom object where you can cange the visibility of custom field. If the custom field is not marked as visible, click on the "Edit" button on the top of the page, select the checkbox and save you setting (click on the "Save" button).)
-
Parul
MemberSeptember 22, 2018 at 5:35 pm in reply to: While creating JavaScript button to execute anonymous Salesforce Apex, what should you keep in mind?While creating JavaScript button, user must be aware that its only supported in Salesforce classic and not in Salesforce Lightning because it needs to have “Apex Author” permission.
-
Parul
MemberSeptember 22, 2018 at 5:30 pm in reply to: Can we select Person Account as parent for Business Account and create Account hierarchy in Salesforce?"I can't choose a Person Account as a Parent Account of another Account. Please help!" ... You can, however, use Contacts to Multiple Accounts to create indirect relationships between a person account and another person account, business account, or contact
-
Parul
MemberSeptember 22, 2018 at 5:28 pm in reply to: How much space is taken by each Person Account record in Salesforce?Person Accounts consume a record in both the Account and Contact objects. Each record allocates 2KB, so each Person Account record will require 4KB of storage space. As an example, 500,000 person accounts will require around 2GB of storage.
-
Parul
MemberSeptember 22, 2018 at 5:27 pm in reply to: How many types of the relationship fields available in Salesforce?Master-detail relationship
Lookup relationship
Self-relationship
External lookup relationship
Indirect lookup relationship
Many-to-many relationship (junction object)
Hierarchical relationship -
Parul
MemberSeptember 22, 2018 at 5:26 pm in reply to: What will happen if the Account is deleted in Salesforce?If the Account is deleted then Contact also deleted
-
Parul
MemberSeptember 22, 2018 at 5:25 pm in reply to: What is Roll up summary field 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 detail record must be related to the master through a master-detail relationship. For example, you want to display the sum of invoice amounts for all related invoice custom object records in an account’s Invoices related list. You can display this total in a custom account field called Total Invoice Amount.