Parul
IndividualForum Replies Created
-
Parul
MemberSeptember 22, 2018 at 12:43 PM in reply to: Can you please explain Implicit and Explicit Invocation of Salesforce Apex?Triggers: Implicit
Javascript remoting: Explicit -
Parul
MemberSeptember 22, 2018 at 12:41 PM in reply to: In Which object all Apex Triggers are stored ?Hi
Can you explain this question Ididn't get.
-
Virtual class are functional classes and can be instantiated or extended without then need of overriding methods.
virtual class
child class interact with parent class using extend keyword
Thanks
-
abstract classes can contain methods that don't require an override and methods that do require an override, since it can contain methods that do require and override it must be extended to be constructed. useful if you want to share code among several closely related classes that impliment a common interface
eg:
public abstract class abscl {
public void m1(){ // Defined and Implemented
System.debug(' I am in abscl: m1');
}
Public void m2(){ // Defined not implemented
}
public abstract void m3(); // Declared: Not Defined and Not Implemented this should be declared abtract method not implemented body method.
}child class
public class abschd extends abscl{
public override void m3(){ // the abstract method should be declared in child class using override but object is created in child class only.System.debug('I am in absch: m3 ');
}
}Thanks
-
Parul
MemberSeptember 22, 2018 at 12:34 PM in reply to: Can you edit an apex trigger/ apex class and Visualforce pages in production environment?Only Developer Edition, Sandbox, and Trial organizations have the ability to create, edit, and delete Apex classes and triggers directly in the Salesforce CRM user interface. Unlimited Edition and Enterprise Edition production organizations can execute Apex and can view Apex in the user interface, but modifying Apex in the user interface is not allowed.
The Apex classes and triggers should first be written in a Developer Edition, Sandbox, or Trial organization along with the appropriate test methods that test at least 1% of triggers and 75% of classes. To deploy Apex into a production organization, a user with the Author Apex permission must deploy the triggers and classes using either the compileAndTest() or deploy() Metadata API methods which can be accessed with either the Apex Development Tool based on Apache ANT or the Force.com IDE based on Eclipse.
-
Parul
MemberSeptember 22, 2018 at 12:32 PM in reply to: What’s the best way to check if person accounts are enabled via Salesforce Apex Code?Hi
Method 1:
Endeavor to get to the is Person Account property on an Account and catch any exemption that happens if that property is absent. In the event that a special case is produced then individual records are handicapped. Else, they’re empowered. To abstain from making individual records required for the (Salesforce Certification Training) bundle you allocate the Account protest a subject and utilize subject. Get (‘is Person Account’) as opposed to getting to that property straightforwardly on the Account question.
This method takes ~3.5ms and negligible heap space in my testing.Method 2:
Use the account meta-data to check to see if the isPersonAccount field exists. I think this is a more elegant method but it executes a describe call which counts towards your governor limits. It’s also slightly slower and uses a lot more heap space.Thanks
-
Parul
MemberSeptember 22, 2018 at 12:32 PM in reply to: What is a sandbox org? What are the different types of sandboxes in Salesforce?Developer Sandbox
Developer sandboxes are special configuration sandboxes intended for coding and testing by a single developer. Multiple users can log into a single Developer sandbox, but their primary purpose is to provide an environment in which changes under active development can be isolated until they’re ready to be shared. Just like Developer Pro sandboxes, Developer sandboxes copy all application and configuration information to the sandbox. Developer sandboxes are limited to 200 MB of test or sample data, which is enough for many development and testing tasks. You can refresh a Developer sandbox once per day.
REFRESH LIMIT :- Daily
DATA LIMIT :- 200MBDeveloper Pro Sandbox
The main difference between this and Developer is the amount of data that can be stored. It also grabs some product data from production. If those two things are important, use this one. Otherwise, it's interchangeble with Developer
Developer Pro sandboxes copy all of your production organization's reports, dashboards, price books, products, apps, and customizations under Setup, but exclude all of your organization's standard and custom object records, documents, and attachments. Creating a Developer Pro sandbox can decrease the time it takes to create or refresh a sandbox from several hours to just a few minutes, but it can only include up to 1 GB of data. You can refresh a Developer Pro sandbox once per day
REFRESH LIMIT :- Daily
DATA LIMIT :- 1GBPartial Copy
Partial Data sandboxes include all of your organization’s metadata and add a selected amount of your production organization's data that you define using a sandbox template. A Partial Data sandbox is a Developer sandbox plus the data you define in a sandbox template. It includes the reports, dashboards, price books, products, apps, and customizations under Setup (including all of your metadata). Additionally, as defined by your sandbox template, Partial Data sandboxes can include your organization's standard and custom object records, documents, and attachments up to 5 GB of data and a maximum of 10,000 records per selected object. A Partial Data sandbox is smaller than a Full sandbox and has a shorter refresh interval. You can refresh a Partial Data sandbox every 5 days.
REFRESH LIMIT :- 5 Days
DATA LIMIT :- 5GBFull Sandbox
Full sandboxes copy your entire production organization and all its data, including standard and custom object records, documents, and attachments. You can refresh a Full sandbox every 29 days.
Sandbox templates allow you to pick specific objects and data to copy to your sandbox, so you can control the size and content of each sandbox. Sandbox templates are only available for Partial Data or Full sandboxes.
REFRESH LIMIT :- 29 Days
DATA LIMIT :- Same as Production -
Parul
MemberSeptember 22, 2018 at 12:30 PM in reply to: A string ‘updated’ is added to all users in Account object via batch apex, now how to remove 'updated' in Salesforce Apex?hi
As far i understand your problem you can try to Run the below code in developer console
List<Account> acc =[SELECT Id, Name FROM Account];
for(Account a : acc)
{
a.Name = a.Name.removeEnd(‘Updated’);
update a;
}Hoping it will help you:
Thanks
-
As we know, Apex runs in multi-tenant environment, i.e., a single resource is shared by all the customers and organizations. So, it is necessary to make sure that no one monopolizes the resources and hence Salesforce.com has created the set of limits which governs and limits the code execution. Whenever any of the governor limits are crossed, it will throw error and will halt the execution of program.
From a Developer's perspective, it is important to ensure that our code should be scalable and should not hit the limits.
All these limits are applied on per transaction basis. A single trigger execution is one transaction.
As we have seen, the trigger design pattern helps avoid the limit error. We will now see other important limits.
-
Parul
MemberSeptember 22, 2018 at 12:26 PM in reply to: How to insert value to a parent and child element at the same time in Salesforce?We know using trigger we can insert record on parent-child at the same time or i think we can use the [process builder to insert the record.
Thanks
-
Parul
MemberSeptember 22, 2018 at 12:26 PM in reply to: Can two users have the same profile and two profiles be assigned to the same user in Salesforce?Custom Profiles: Custom ones defined by us. They can be deleted if there are no users assigned to that particular one. The permission set is also very similar to profile. ... But the main difference between these two is that user can have only one profile and can have multiple permission sets at a time.
-
Parul
MemberSeptember 22, 2018 at 12:10 PM in reply to: Can’t Deploy Due to Errors in 3rd Party Packages in Salesforce?I think first you need to uninstall them on the off chance that you need to convey from Sandbox to creation and reinstall them,
Your probably going to have to uninstall them if you want to deploy from Sandbox to production, and reinstall them.
If it's Milestones PM (the package) is you can probably get an unmanaged version to work with and fix the bugs.
Thanks
-
Parul
MemberSeptember 22, 2018 at 12:00 PM in reply to: How to make picklist as required (thru javascript) in Salesforce ?use this code snippet:
I have used Javascript and its working.
<apex:page standardController="Lead" >
<script>
function validateForm()
{
var x = document.getElementById('{!$Component.exname}');
if (x == null || x == "")
{
alert("Please select Value");
return false;
}
}
</script>(Add onsubmit="return validateForm()" in to Web-To-Lead form code as shown in below)
<form id="enquiryFrm" action="https://cs41.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" onsubmit="return validateForm()" method="post" ><section class="form-row">
<apex:outputLabel value="Interested In:"/>
<apex:outputPanel layout="block" styleClass="requiredInput">
<apex:outputpanel layout="block" styleClass="requiredBlock"/>
<section class="select-outer">
<select class="select" id="00N3600000NxhqK" name="exname" title="Interested In">
<option value="">Please select</option>
<option value="Mobile Apps">Mobile Apps</option>
<option value="Web Apps">Web Apps</option>
<option value="Salesforce">Salesforce</option>
<option value="Technical Support">Technical Support</option>
<option value="Application Support">Application Support</option>
</select>
</section>
</apex:outputpanel>
</section>Hope this helps:
Thanks
-
Parul
MemberSeptember 22, 2018 at 11:56 AM in reply to: How do you refer to current page id in Salesforce Apex?Adding some point:
you can also use this
apexpages.currentpage().getparameters().get('id') for visualforce page's id.
Thanks
-
Parul
MemberSeptember 22, 2018 at 11:51 AM in reply to: A case is generated by user through web to case, how or where a Salesforce developer will provide solution case arised?we know when case generated we provide case generated by using Workflow run the show or Email notification
Thanks
-
Parul
MemberSeptember 22, 2018 at 11:49 AM in reply to: How Can I Tell the Day of the Week of a Date in Salesforce?There are two popular formulas that you can use to find the day of the week for a given date. You should be careful when you use these formulas, though, because they only work for the Gregorian calendar. (People in English-speaking countries used a different calendar before September 14, 1752.)
Zeller's Rule
The following formula is named Zeller's Rule after a Reverend Zeller. [x] means the greatest integer that is smaller than or equal to x. You can find this number by just dropping everything after the decimal point. For example, [3.79] is 3. Here's the formula:
f = k + [(13*m-1)/5] + D + [D/4] + [C/4] - 2*C.
Thanks
-
Parul
MemberSeptember 22, 2018 at 11:47 AM in reply to: Remove 'updated' from users in Account object through batch apex.HI
Run the below code in developer console
List acc =[SELECT Id, Name FROM Account];
for(Account a : acc)
{
a.Name = a.Name.removeEnd(‘Updated’);
update a;
}
(Top 30 Salesforce Apex Interview Questions and Answers Pdf)
16. How do you pass the parameters from on apex class to another to another ?
Answer: You can simply pass the parameters through the URL.say you are redirecting from one VF page to another
string value = ‘your param value’;
string url;
url = ‘/apex/VF_Page_Name?param1=’ + value;
PageReference pageRef = new PageReference(url);
pageRef.setRedirect(true);
return pageRef;
Then in the controller of the VF page, you just can get the param like this
String param_value = system.CurrentPageReference.GetParameters().get(‘param1’);
Thanks
-
Parul
MemberSeptember 22, 2018 at 11:45 AM in reply to: What are outbound messages in Salesforce? what it will contain?Adding some points
Outbound messaging is part of the workflow rule functionality in Salesforce. Workflow rules watch for specific kinds of field changes and trigger automatic Salesforce actions, such as sending email alerts, creating task records, or sending an outbound message to external services.
-
Parul
MemberSeptember 22, 2018 at 11:45 AM in reply to: Explain the use of OutBound Message in Salesforce.Adding some points:
In outbound message contains end point URL.
Outbound messaging uses the notifications() call to send SOAP messages over HTTP(S) to a designated endpoint when triggered by a workflow rule. After you set up outbound messaging, when a triggering event occurs, a message is sent to the specified endpoint URL.
Thanks
-
Addins some points:
Virtual Classes like abstract classes but unlike interfaces can have constructors.
Virtual classes constructors can be called directly and they can be instantiated unlike interfaces
It is not mandatory to override virtual methods So it’s great
Even an abstract class can extend virtual classes ;), remember, this is not possible for interfaces, they can’t have any method bodies, so no point extending virtual classesThanks
-
Parul
MemberSeptember 22, 2018 at 11:41 AM in reply to: Can you tell me what is time based workflow in Salesforce?Adding some points:
Salesforce users have an option to Monitor their time based workflow actions pending in the queue. In order to do that, they can follow these steps:
1. From Setup, enter Time-Based Workflow in the Quick Find box, then select Time-Based Workflow.
2. Click Search to view all pending actions for any active workflow rules, or set the filter criteria and click Search to view only the pending actions that match the criteria.Disadvantage:
Time based workflow actions will not always execute at the exact time displayed in the Monitoring setup menu. Instead, they are batched and executed every 15 minutes. Considerations for Time-Dependent Actions and Time Triggers still apply. Therefore the expectation for the execution of time based workflow actions should be within 15 minutes of the scheduled time unless the Time Trigger per hour limit is exceeded, which will push the batch to the next hour.
Thanks
-
Parul
MemberSeptember 22, 2018 at 11:41 AM in reply to: What is Time-dependent workflow and its limitations in Salesforce?Adding some points:
Time Based work process will be activated at what time we characterize while making the Time-Dependent work process run the show.
Thanks
-
Parul
MemberSeptember 22, 2018 at 5:54 AM in reply to: How can I remove the markers that lies outside the circle boundary in Salesforce?I didn't understand the question can you explain more.
Thanks
-
Parul
MemberSeptember 22, 2018 at 5:35 AM in reply to: How to get a beep sound in Salesforce Visualforce Page?Adding some points:
You’ll need to embed a short WAV file in the HTML, and then play that via code.It’s not possible to do directly in JavaScript. It’s not possible to do directly in JavaScript.
<script>
function PlaySound(soundObj) {
var sound = document.getElementById(soundObj);
sound.Play();
}
</script><embed src=”success.wav” autostart=”false” width=”0″ height=”0″ id=”sound1″
enablejavascript=”true”>Now, you can call above script in VF page.
Thanks.
-
Adding some points:
You do this by using Javascript . You’ll need to embed a short WAV file in the HTML, and then play that via code.
<script>
function BeepSound(soundObj) {
var sound = document.getElementById(soundObj);
sound.Play();
}
</script><embed src=”success.wav” autostart=”false” width=”0″ height=”0″ id=”sound1″
enablejavascript=”true”>And then you can call this javascript method from Visualforce page like:
<apex:commandLink value=”Beep Button” onclick=”BeepSound(Sound1)” />
Thanks