Prafull
IndividualForum Replies Created
-
Hi Matthew,
The Task Manager app displays each task created in the system in the form of a table, and you may sort on the pre-defined columns, and filter using search text. So it does not matter if you define the tasks against a parent account or children account, all tasks will simply be displayed in a list view. It will also display the name of accounts against which tasks are created.
Thanks and Regards,
Prafull Kumar -
Prafull
MemberSeptember 7, 2018 at 10:09 am in reply to: If I am using text email template, Is it possible to access account name in it?Yes, you can use {!Account.Name} to access in text email template.
Thnaks!
-
Hi,
List method is used for all instance methods. This operates on any particular instance of list.
For example:-
MyFirstList.clear();In the above example, I am clearing all element of the MyFirstList instance.
Below is the list of all related constructors and method of the List Class:-
Constructor
-
List()
Creates a new instance of the List class. A list can hold elements of any data type T. -
List(listToCopy)
Creates a new instance of the List class by copying the elements from the specified list. T is the data type of the elements in both lists and can be any data type. -
List(setToCopy)
Creates a new instance of the List class by copying the elements from the specified set. T is the data type of the elements in the set and list and can be any data type.
Method
-
add(listElement)
Adds an element to the end of the list. -
add(index, listElement)
Inserts an element into the list at the specified index position. -
addAll(fromList)
Adds all of the elements in the specified list to the list that calls the method. Both lists must be of the same type. -
addAll(fromSet)
Add all of the elements in specified set to the list that calls the method. The set and the list must be of the same type. -
clear()
Removes all elements from a list, consequently setting the list's length to zero. -
clone()
Makes a duplicate copy of a list. -
contains(listElement)
Returns true if the list contains the specified element. -
deepClone(preserveId, preserveReadonlyTimestamps, preserveAutonumber)
Makes a duplicate copy of a list of sObject records, including the sObject records themselves. -
equals(list2)
Compares this list with the specified list and returns true if both lists are equal; otherwise, returns false. -
get(index)
Returns the list element stored at the specified index. -
getSObjectType()
Returns the token of the sObject type that makes up a list of sObjects. -
hashCode()
Returns the hashcode corresponding to this list and its contents. -
indexOf(listElement)
Returns the index of the first occurrence of the specified element in this list. If this list does not contain the element, returns -1. -
isEmpty()
Returns true if the list has zero elements. -
iterator()
Returns an instance of an iterator for this list. -
remove(index)
Removes the list element stored at the specified index, returning the element that was removed. -
set(index, listElement)
Sets the specified value for the element at the given index. -
size()
Returns the number of elements in the list. -
sort()
Sorts the items in the list in ascending order.
Hope this will help you to understand List Class.
Thanks!
-
List()
-
Hi,
Salesforce provides Limit class with some methods for fetching specific limit for the particular governor such as heap size limitation or the number of APIs call of org etc. Below is the list of methods of Limit class.-
getAggregateQueries()
Returns the number of aggregate queries that have been processed with any SOQL query statement. -
getLimitAggregateQueries()
Returns the total number of aggregate queries that can be processed with SOQL query statements. -
getAsyncCalls()
Reserved for future use. -
getLimitAsyncCalls()
Reserved for future use. -
getCallouts()
Returns the number of Web service statements that have been processed. -
getChildRelationshipsDescribes()
Deprecated. Returns the number of child relationship objects that have been returned. -
getLimitCallouts()
Returns the total number of Web service statements that can be processed. -
getCpuTime()
Returns the CPU time (in milliseconds) accumulated on the Salesforce servers in the current transaction. -
getLimitCpuTime()
Returns the time limit (in milliseconds) of CPU usage in the current transaction. -
getDMLRows()
Returns the number of records that have been processed with any statement that counts against DML limits, such as DML statements, the Database.emptyRecycleBin method, and other methods. -
getLimitDMLRows()
Returns the total number of records that can be processed with any statement that counts against DML limits, such as DML statements, the database.EmptyRecycleBin method, and other methods. -
getDMLStatements()
Returns the number of DML statements (such as insert, update or the database.EmptyRecycleBin method) that have been called. -
getLimitDMLStatements()
Returns the total number of DML statements or the database.EmptyRecycleBin methods that can be called. -
getEmailInvocations()
Returns the number of email invocations (such as sendEmail) that have been called. -
getLimitEmailInvocations()
Returns the total number of email invocation (such as sendEmail) that can be called. -
getFindSimilarCalls()
Deprecated. Returns the same value as getSoslQueries. The number of findSimilar methods is no longer a separate limit, but is tracked as the number of SOSL queries issued. -
getLimitFindSimilarCalls()
Deprecated. Returns the same value as getLimitSoslQueries. The number of findSimilar methods is no longer a separate limit, but is tracked as the number of SOSL queries issued. -
getFutureCalls()
Returns the number of methods with the future annotation that have been executed (not necessarily completed). -
getLimitFutureCalls()
Returns the total number of methods with the future annotation that can be executed (not necessarily completed). -
getHeapSize()
Returns the approximate amount of memory (in bytes) that has been used for the heap. -
getLimitHeapSize()
Returns the total amount of memory (in bytes) that can be used for the heap. -
getMobilePushApexCalls()
Returns the number of Apex calls that have been used by mobile push notifications during the current metering interval. -
getLimitMobilePushApexCalls()
Returns the total number of Apex calls that are allowed per transaction for mobile push notifications. -
getQueries()
Returns the number of SOQL queries that have been issued. -
getLimitQueries()
Returns the total number of SOQL queries that can be issued. -
getQueryLocatorRows()
Returns the number of records that have been returned by the Database.getQueryLocator method. -
getLimitQueryLocatorRows()
Returns the total number of records that have been returned by the Database.getQueryLocator method. -
getQueryRows()
Returns the number of records that have been returned by issuing SOQL queries. -
getLimitQueryRows()
Returns the total number of records that can be returned by issuing SOQL queries. -
getQueueableJobs()
Returns the number of queueable jobs that have been added to the queue per transaction. A queueable job corresponds to a class that implements the Queueable interface. -
getLimitQueueableJobs()
Returns the maximum number of queueable jobs that can be added to the queue per transaction. A queueable job corresponds to a class that implements the Queueable interface. -
getRunAs()
Deprecated. Returns the same value as getDMLStatements. -
getLimitRunAs()
Deprecated. Returns the same value as getLimitDMLStatements. -
getSavepointRollbacks()
Deprecated. Returns the same value as getDMLStatements. -
getLimitSavepointRollbacks()
Deprecated. Returns the same value as getLimitDMLStatements. -
getSavepoints()
Deprecated. Returns the same value as getDMLStatements. -
getLimitSavepoints()
Deprecated. Returns the same value as getLimitDMLStatements. -
getSoslQueries()
Returns the number of SOSL queries that have been issued. -
getLimitSoslQueries()
Returns the total number of SOSL queries that can be issued.
Thanks!
-
getAggregateQueries()
-
Prafull
MemberJuly 17, 2018 at 12:40 pm in reply to: How to Set Up Governor Limit Email Warnings in Salesforce?Hi Shradha,
You can follow the below steps to setup Governor limit email warning in salesforce.- Log in to Salesforce with the profile of administrator user.
- Go to Setup, type Users in the Quick Find box, then click Users.
- Click Edit link next to the name of the user whom you want to receive the email notifications.
- Check the option for Send Apex Warning Emails.
- Click Save.
Thanks!
-
Prafull
MemberApril 6, 2018 at 7:06 am in reply to: Allowing non admins to edit Case Manager ConfigurationHi Jonathan,
Thanks for showing interest in our Case Management app. I just wanted to inform you that this is not possible to edit Case Manager Configuration except System Administration profile. This is restricted because System Administrator better knows Organization business requirement, so only System Administrator can edit Case Manager Configuration.
If you have another scenario in your organization to edit Case Manager Configuration with another profile, then we can discuss and try to satisfy your organization business requirement in the future release of the app.
Let us know if you have any further questions.
Thanks and Regards,
Prafull Kumar -
Prafull
MemberFebruary 13, 2018 at 10:58 am in reply to: How can we activate/ deactivate trigger/ validation rule and workflow using Salesforce Apex Code?Hi Rahul,
Practically this is not possible directly using apex code. But there is another way to do this.
You can create a custom label or custom setting with checkbox which can be updated using apex code and you can implement condition to fire Validation rule or workflow with checkbox true else this will not fire if condition will be false.
Hope this will help you.
Thanks,
Prafull
-
Prafull
MemberFebruary 1, 2018 at 7:55 am in reply to: Uncaught Error in $A.getCallback() [$ is not defined] Callback failed:Hi Alejandro,
It seems like JQuery is conflicting with one of your components where you have used JQuery Api and Salesforce Lightning JQuery API. Lightning has an issue that when you navigation between multiple components then lightning adds new HTML in the DOM each time of component rendering. Previously rendered components hide in the DOM and the current component will be displayed on the screen. So it can be possible that there are multiple JQuery API appended to the DOM and this conflicts the previous Jquery API and user can get the same error as mentioned.
You may have to use jQuery noConflict function in your component. You may also read more about jQuery’s noConflict function through below link. you need to use noConflict function in your custom component.
https://api.jquery.com/jquery.noconflict/
Hope this will help you.
-Prafull
-
Prafull
MemberJanuary 29, 2018 at 3:14 pm in reply to: Lockerservice Impact on Lightning ready Salesforce Visualforce Pages?This critical update was part of Summer '16 and was enforced in Winter '17. This doesn’t support 3rd party Libraries in case the included library uses another library internally.
This update introduced for the security of salesforce data. below is the advantage and limitation of Locker service as below:-
LockerService Advantages
- No iframe. Components live in the same DOM (better performance)
- Straightforward, natural communication between components
- Cohesive UI
- Eliminates DOM scraping vulnerabilities
- Mitigates the impact of developer mistakes such as the lack of proper escaping
- Cross-site scripting (XSS) and template injection are no longer possible
- Eliminate server-side action invocation/spoofing
LockerService Limitations
- Non-compliant libraries will not work with LockerService
Thanks!
-
Prafull
MemberJanuary 29, 2018 at 3:00 pm in reply to: How to Embed "Payment Page" (Hosted Pages) in a Salesforce Visualforce page?You are not able to do this because I-frame considers inner content as of different domain. And in salesforce, treats it as a cross-domain issue.
You need to create your own custom VF page for payment page with the payment form. You need to call payment API after submitting the form. That will work well. -
Prafull
MemberJanuary 29, 2018 at 2:23 pm in reply to: Process Composer vs Workflow Rules in Salesforce?Process Composer app is easy to use for any type of organization. You just need to configure your business flow and you can automate your workflow process with this app without using any coding. There are mainly three key features of this app as below:-
- BUILD- Eliminate the process manual. Store your process templates for repeated use. Steps in a process can be a Task, Custom Object, Checklist, Scheduled Event, Email Alert, Field Update, Webservice Callout or Document Merge (when paired with Mix™).
- RUN- Kick off processes automatically when a record is created or updated, an event is scheduled on your calendar, time has passed (recurring processes), when records match your specific criteria, or manually by creating a record.
- VISUALIZE- Visualize your processes with our process visualizations, including flow chart and Gantt views. Virtual Steps help you peer into your future workload of steps that haven't been created yet.
Thanks!
-
Prafull
MemberJanuary 29, 2018 at 2:08 pm in reply to: URL doesn't exists when using an iframe in a Salesforce Visualforce Page.Can you please elaborate your issue? I am not getting your issue.
-
Prafull
MemberJanuary 29, 2018 at 1:48 pm in reply to: How Single sign On feature helps in securing Salesforce?SSO feature has multiple advantages with the salesforce data security as below :-
- Improved productivity - It takes an average of 20 seconds for a user to log into a resource. Not having to enter a password each time a user needs to access a resource saves time and makes users more productive.
Reduce frustration of multiple log-on events and forgotten passwords - Users only have one password to remember and update, and only one set of password rules to remember. Their initial login provides them with access to all resources, typically for the entire day. - Increased adoption - SSO reduces the barriers of use for resources. Since it is easier to access applications, users will start using them more.
- Centralized user access control - A single registry of user identities with a centralized management interface allows quick and easy provisioning and deactivating of users.
- Improved reporting and monitoring - A single repository for auditing and logging access to resources provides streamlined regulatory compliance.
- Increased security - A secure, enterprise-wide infrastructure with common password and security policies that can be centrally managed and secured. Users are also less likely to write down their passwords when there is only one to remember.
- Uniform security layer - SAML is platform agnostic allowing enterprise architects to implement a uniform security layer with existing assets.
- Reduced helpdesk costs - Fewer helpdesk calls for password resets relates directly to bottom-line savings.
There are some more advantage of SSO as below:-
- Uses a stronger form of user authentication, such as integration with a secure identity provider
- Makes your login page private and accessible only behind a corporate firewall
- Differentiates your org from all other companies that use Salesforce to reduce phishing attacks
Hope this will help you.
Thanks!
- This reply was modified 6 years, 9 months ago by Prafull.
- Improved productivity - It takes an average of 20 seconds for a user to log into a resource. Not having to enter a password each time a user needs to access a resource saves time and makes users more productive.
-
Prafull
MemberJanuary 29, 2018 at 1:38 pm in reply to: Can we do Captcha implementation while exporting data from Salesforce?Salesforce can require users to pass a simple text-entry user verification test to export data from Salesforce. This type of network-based security helps prevent malicious users from accessing your organization’s data, and can reduce the risk of automated attacks.
To pass the test, users must type two words displayed on an overlay into the overlay’s text box field, and click a Submit button. Salesforce uses CAPTCHA technology provided by reCaptcha to verify that a person, as opposed to an automated program, has correctly entered the text into the overlay. CAPTCHA stands for “Completely Automated Public Turing test to tell Computers and Humans Apart.” -
Prafull
MemberJanuary 29, 2018 at 1:22 pm in reply to: Can we add the field of other object in the related list of non related object in Salesforce?I don't think this can be done directly but you can achieve this in another way as below.
You need to create a custom field on Y object. Which will be formula field with the value of Z object and then you can use that custom field in the related list.
Thanks!
-
Prafull
MemberJanuary 29, 2018 at 1:16 pm in reply to: Date validation in jQuery moment datepicker in Salesforce?I was able to find the solution. Since the date I am getting is in ISO format, only providing date to moment will validate it, no need to pass the dateFormat.
var date = moment("2016-10-19");
And then date.isValid() gives desired result. -
Prafull
MemberJanuary 29, 2018 at 1:06 pm in reply to: Jquery moment datetimepicker Timezones in SalesforceDatepicker uses UTC (+800) time by default. You will need the moment-timezone api to change your timezone.
You can then convert the timezone to whatever timezone you want:
// guess current client's timezone
var guess = moment.tz.guess();// get moment object from datetimepicker
var datetime = $('#datetimepicker').data("DateTimePicker").date();// convert moment object's timezone
datetime.tz(guess);// set moment object as new value for datetimepicker
$('#datetimepicker').data("DateTimePicker").date(datetime);// also tell datetimepicker about the used timezone
$('#datetimepicker').data("DateTimePicker").timeZone(guess); -
Prafull
MemberOctober 5, 2016 at 6:03 am in reply to: How to know the API Name of Standard or Custom Salesforce Objects?Hi @mann-meet,
You have to swap just condition in the code like below :-
for ( Schema.SObjectType obj : Schema.getGlobalDescribe().values() )
{
Schema.DescribeSObjectResult objDescription = obj.getDescribe();
if(objDescription.getName() == '##Your API Name##'){
system.debug( 'Object Name: ' + objDescription.getLabel() );
}
}Regards,
Prafull- This reply was modified 8 years, 1 month ago by Prafull.
-
Hi Tanu,
We can use lightning component in Android for dynamic or static application. You can use latest 7.3 update to the Salesforce1 app for Android.
Thanks,
Prafull- This reply was modified 8 years, 4 months ago by Prafull.
-
Prafull
MemberJuly 12, 2016 at 11:13 am in reply to: How to delete a community in Salesforce to maintain the limit?Hi Pranav,
You can't delete community from Salesforce. You can create maximum 50 communities in Salesforce. If you want to exceed your community limit then you can contact to Salesforce to do that in your org. You may also mark your community as "Inactive" so it is not counted in Active Communities. Hope it makes sense.
Thanks,
Prafull -
Prafull
MemberJuly 8, 2016 at 1:03 pm in reply to: Restricting Input Text Field declared as Decimal from entering text valuesHi Ravi,
I am showing the solution below with the help of a VF page and its controller.
Visualforce page :-
<apex:page standardController="Account" extensions="VfPageErrorMessageController">
<apex:form >
<apex:pageblock >
<apex:pageMessages id="showmsg"></apex:pageMessages>
<apex:panelGrid columns="2">
Account Name: <apex:inputText value="{!acc.name}"/>
Account Number: <apex:inputText value="{!acc.AccountNumber}"/>
Account Phone: <apex:inputText value="{!acc.phone}"/>
Account Site: <apex:inputText value="{!acc.site}"/>
Account Industry: <apex:inputText value="{!acc.industry}"/>
<apex:commandButton value="Update" action="{!save}" style="width:90px" rerender="showmsg"/>
</apex:panelGrid>
</apex:pageblock>
</apex:form>
</apex:page>I have considered that "acc.AccountNumber" is declared as Decimal.
Controller :-
public class VfPageErrorMessageController {
public Account acc{get;set;}
public VfPageErrorMessageController(ApexPages.StandardController controller) {
acc = new Account();
}
public class DecimalResult{
public Boolean IsValid{ get; private set; }
public Decimal Value { get; private set; }
public DecimalResult(Boolean pIsValid, Decimal pValue){
IsValid = pIsValid;
Value = pValue;
}
public DecimalResult(Boolean pIsValid){
IsValid = pIsValid;
Value = null;
}
}
public static DecimalResult toDecimal(String strInput){
DecimalResult result = null;
try {
Decimal decimalValue = Decimal.valueOf(strInput);
result = new decimalResult(true, decimalValue);
}
Catch (exception e) {
result = new DecimalResult(false);
}
return result;
}
public void save(){
DecimalResult res2 = toDecimal(acc.AccountNumber);
if(!res2.IsValid){
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please enter valid decimal value'));
}
}
}Hope this helps...
Thanks,
Prafull -
Prafull
MemberJuly 6, 2016 at 6:50 am in reply to: How to know the API Name of Standard or Custom Salesforce Objects?Hi Mark,
You can use following code sample to get API Name of any objects.
`
for ( Schema.SObjectType obj : Schema.getGlobalDescribe().values() )
{
Schema.DescribeSObjectResult objDescription = obj.getDescribe();
if(objDescription.getLabel() == '##Your Object Name##'){
system.debug( 'API Name: ' + objDescription.getName() );
}
}
`You have to replace object name with "##Your Object Name##". This will work for both Standard objects and Custom objects.
Thanks,
Prafull -
Prafull
MemberJune 9, 2016 at 11:38 am in reply to: How to enable lightning app builder in Salesforce?Go to this link, hope this will help you :-
https://www.forcetalks.com/blog/introduction-of-lightning-component-framework/
-
Prafull
MemberApril 28, 2016 at 11:21 am in reply to: Custom Javascript button error - dialog is not a functionHi Abhinav,
The latest and stable version of jQuery UI is 1.11.4. you can download this package as a zip folder here .
-
Prafull
MemberApril 28, 2016 at 6:21 am in reply to: Can I open lightning component in Visualforce without using Lightning app.?Lightning component can not be used without using lightning app in Visualforce page. You can use Lightning component only using app. Actually you can not treat Lightning component like Visualforce component in Visualforce page. You can use Visualforce component only in Visualforce page.