- Manj_SFDC
- SMARTIE
- 905 Points
- Member since 2014
- Architect
-
ChatterFeed
-
24Best Answers
-
1Likes Received
-
0Likes Given
-
19Questions
-
295Replies
Email Template V.2
I am fairly new to Salesforce. I have encounter this issue and would like to see, is there anyone that can help me with this roadblock that I have encounter? Is there any documents, videos or anyone who can help me with pertaining to how to run a query to find email templates that contain a certain string ex: Pasta that would also include the subject line and content, and trigger if possible
-
- Micheal Mitchell
- February 13, 2019
- Like
- 0
- Continue reading or reply
checkbox field to false on true of another checkbox and vise versa
How to do that with out code?
-
- Amarjeet
- February 13, 2019
- Like
- 0
- Continue reading or reply
how to convert 15 digit SF record Id to 18 digit
I have a formula filed and I am comparing the recordtype id (15 digits) with the recordtype id mentioned in custom label (18 digits) instead of changing the custom label can i handle that in the validation rule?
-
- Gadigeppagouda Patil
- August 12, 2018
- Like
- 0
- Continue reading or reply
Can I delete an user from salesforce and what is freeze
-
- shiva kumawar
- July 12, 2018
- Like
- 0
- Continue reading or reply
Can i use salesforce in Android mobiles?
-
- Ganesh Thigari
- May 27, 2018
- Like
- 0
- Continue reading or reply
can the Notes and Attachments be customized
-
- shiva kumawar
- May 27, 2018
- Like
- 0
- Continue reading or reply
your advice concerning test class on triggers
I just began to create test classes and I had a question about the good practices.
Assume we have a trigger that updates a "LastOrderDate__c" on Account, based on the field EffectiveDate in Order object.
We can have different cases :
- We delete an order - Account had only this order => LastOrderDate__c becomes null
- We delete an order - Account had several orders => LastOrderDate__c becomes the max(EffectiveDate) of his other orders
- We create/update an order => LastOrderDate__c becomes the max(EffectiveDate) of all his orders
Should I make only one test class including all the steps to cover all the cases ?
- test class
- create order 1
- create order 2
- delete order 1
- delete order 2
- test class1
- create order
- test class2
- create order
- delete order
- test class3
- create order1
- create order2
- delete order1
- delete order2
Should I then test with System.assertEquals the value of LastOrderDate after each action (create/delete) ?
Thanks for your help
-
- Doria Hamelryk Vetrano
- May 01, 2018
- Like
- 0
- Continue reading or reply
I need to have a code which counts the no of times the record has been accessed , please give logic
need to have a code which counts the no of times the record has been accessed , please give logic or code I need to complete
Thanks
-
- Vithal Sindigar
- April 06, 2018
- Like
- 0
- Continue reading or reply
unexpected token while entering the code in apex development
account acc;
acc = new account;
acc.name='suresh';
acc.industry='telecom'
acc.rating='9';
acc.phone='9246100100';
insert acc;
system.debug('account id....'+acc.id);
-
- Nagarjun T
- April 05, 2018
- Like
- 0
- Continue reading or reply
Issues with IF-else statement
if(ppterm.size()>0){
if( ppterm[0].PP_Term_Approval_Status__c == 'Updated in SAP'|| ppterm[0].PP_Term_Approval_Status__c == 'Closed'){
country = ppterm[0].PP_Term_Approval_Status__c + '/' + term.PP_Country__c;
return country;
}else if(ppterm[0].PP_Term_Approval_Status__c != null && ppterm[0].PP_Term_Approval_Status__c != 'submitted'){
country = 'No_Termination_Access' + '/' + term.PP_Country__c;
return country;
}
ppterm[0].PP_First_Name__c = term.FirstName;
ppterm[0].PP_Last_Name__c = term.LastName;
ppterm[0].PP_Emp_Original_Hire_Date__c = term.PP_Hiring_Date__c;
ppterm[0].PP_Emp_Global_ID__c = term.PP_ABI_Global_ID__c;
ppterm[0].PP_Emp_PersID__c = string.valueOf(term.PP_Employee_Number__c);
ppterm[0].PP_Emp_DOB__c = term.PersonBirthdate;
}
-
- Ayush Kumar 31
- April 05, 2018
- Like
- 0
- Continue reading or reply
Email Verification Not Being Received
Things I've looked at alreayd:
Created another org wide email and I receive the verification email. Deliverability is set to all.
Ensure that the IP Addresses are whitelisted
I've tested deliverability and received all emails.
I've downloaded the file log and it shows that the email have been delivered.
And in google group settings posting is set to allow posting in email, allow users to post to the group on the web.
Does anyone know how to verify the e-mail address? I have a feeling it has something to do with the google group.
-
- Elyse King 10
- April 04, 2018
- Like
- 0
- Continue reading or reply
problem with the onclick javascript for this button or link was encountered unexpected token else?
Please let me know, where am doing wrong?
{!REQUIRESCRIPT('/soap/ajax/29.0/connection.js')}
{!REQUIRESCRIPT('/soap/ajax/29.0/apex.js')}
IF( NOT( ISPICKVAL(Opportunity.Project_Type__c, 'Under Warranty') ))
{
window.parent.location.href ="/0Q0/e?retURL=%2F{!Opportunity.Id}&oppid={!Opportunity.Id}&00N90000002yzdo=<Auto fill by rule>&Name=<auto fill by Rule>&save_new_url=/a06/e?"
}
else
{
alert(' Sorry for the inconvenience. For Under Warranty service you can't Create a Quote');
}
-
- shakila G
- April 04, 2018
- Like
- 0
- Continue reading or reply
Error: Compile Error: Class DisasterRapMonitor must implement the method: void Database.Batchable<SObject>.execute(Database.BatchableContext, List<SObject>) at line 1 column 14
Hello Masters,
I am writing the following Batch but not able to save it. It only ends up with the afore-stated error even though I have included the execute method perfectly to my knowledge. I am mentioning my Class code below and would appreciate any help.
Class:
Global class DisasterRapMonitor implements Database.Batchable <sObject>
{
Global Database.QueryLocator start (Database.BatchableContext BC)
{
String DisasterWithoutRap = 'Select id,name from Disaster__c where id NOT in (select DisasterId from Response_Action_Plan__c)';
return Database.getQueryLocator(DisasterWithoutRap);
}
Global void execute ( Database.BatchableContext BC,List<Disaster__c> Dis)
{
for (Disaster__c di:Dis)
{
Task tk = new Task ();
tk.Subject = 'Need to be associated with a Response immediately. Please work it out.';
tk.WhoId = di.Id;
}
Update Dis;
}
Global void finish (Database.BatchableContext BC)
{}
}
-
- Nikhil Somvanshi
- April 03, 2018
- Like
- 0
- Continue reading or reply
How to exclude an user from a validation rule?
-
- Prathap Test
- March 30, 2018
- Like
- 0
- Continue reading or reply
Scheduling a report but not having the full report in the email - GDPR
We currently have some scheduled reports which contain personal data which we need to protect. Our management team would like the reports to be scheduled still and emailed to them but we need the report to be a URL like and not to contain the report in the email.
Is this possible? Could we just set up an outlook email and paste URL in? Would URL always be the same?
Thanks
-
- Nichola Monger
- March 29, 2018
- Like
- 0
- Continue reading or reply
How can I share/lock records using Apex code
I am looking for a code and explanation to learn record sharing or locking in SF using Apex code, can someone help
Thx in advance
-
- Harish Demo
- March 27, 2018
- Like
- 0
- Continue reading or reply
String array challenge from trailhead.
public Static List<String> generateStringArray(integer n){
/* i want to know that, here the integer n is not initialized with any value, so how i<n works*/
List<String> myArray = new List<String> ();
for(integer i=0; i<n; i++){
myArray.add('Test' +i);
System.debug(myArray[i]);
}
return myArray;
}
}
// And also my above program is failing .
//help me please.
-
- kotipalli srikanth
- March 24, 2018
- Like
- 0
- Continue reading or reply
Record locking in SF
-
- Harish Demo
- March 20, 2018
- Like
- 0
- Continue reading or reply
Outbound message not working with certain profile
I have created a workflow that sends out an outbound message based of some fields not being equal to null and for some odd reason we have a profile that cannot send the outbound message and I have checked the box on the profile settings that allows for outbound messages to be sent. The endpoint URL is not the issue given that my profile(System Administrator) and other profiles(Executives) that we have can send the outbound message without an issue. I have checked all the permissions on the profile compared to mine and they have more things checked than I do. Any assistance would be greatly appreciated.
-
- Pablo Lamas
- March 19, 2018
- Like
- 0
- Continue reading or reply
Flow to delete Open Tasks when opportunity is stage = Archived
We need to delete rather than close as these tasks are asociated to steps in the closing process and if the opportunity is archived the closing process stops so I dont want these tasks to show up for my users.
How do i use a flow to check and list all tasks that are open and then conduct a delete action?
-
- Karen Brown 39
- March 19, 2018
- Like
- 0
- Continue reading or reply
Request a file Salesforce Chat
when the chat agent clicks on Request a file during a Salesforce Chat, he can choose a record to attach the file to, in my implementation it shows, Account, Contact and the case, do we have an option to hide these options and attach the file direclty to the case, please help, thanks!
-
- Manj_SFDC
- April 04, 2021
- Like
- 0
- Continue reading or reply
Unable to view Survey Invitation record in the customer community
Looks like there's a problem.
This record isn't supported. See your administrator for help.
-
- Manj_SFDC
- March 08, 2021
- Like
- 0
- Continue reading or reply
New Button missing on case list view in community
I have created a Menu item under navigation in the communit to display the cases, I can see the list views but "New" button is missing on the list view and I can see the Change Owner button, I have the admin profile assigned, please help, thanks !
-
- Manj_SFDC
- February 20, 2021
- Like
- 0
- Continue reading or reply
Send email to all contacts when account is updated
I have a requirement as follows,
when the Account in updated need to send the email to all the contacts,
custom object - stores the attachments related to contacts
contact has field -Assigned To which can store either user or group data
when the account is updated , I need to query all the contacts related to that account, all the attachments related to the contact and Assigned To field from contact
send an email to the contacts with attachments and to the user/group in the Assigned To field
can anybody help
Thanks
-
- Manj_SFDC
- November 14, 2019
- Like
- 0
- Continue reading or reply
Change Owner Lead list view
I have a list view on Leads and I am trying to change the owner through inline editing , but I am unable to do so, it displays that the field is locked,can you please try to hlep me.
Note - I am trying in the Lightning version
thanks
-
- Manj_SFDC
- July 18, 2018
- Like
- 0
- Continue reading or reply
Trigger Design Pattern
While developing the trigger the logic can be added in the trigger or can be included in the Handler classes and those handlers can be used in the trigger, will there be any disadvantages of using trigger handlers?
-
- Manj_SFDC
- July 17, 2018
- Like
- 0
- Continue reading or reply
Create Report Option for a single object
I have a custom object and Allow Reports is disabled on it, I would like to grant the permission to some of the users to create a report on that custom object , can it be done?
Thanks
-
- Manj_SFDC
- July 17, 2018
- Like
- 0
- Continue reading or reply
sorting by multiple columns in apex
I need to write a SOQL with sorting on 2 columns , start date and created date, can it possible to sort on multiple columns , or by default Apex considers only the first column used in sorting , please help
Thanks !
-
- Manj_SFDC
- July 02, 2018
- Like
- 0
- Continue reading or reply
Apex code to query reportees
i need to get the list of people managed by manager 1 directly or indirectly
can you guys try to help here.
Thanks
-
- Manj_SFDC
- June 25, 2018
- Like
- 0
- Continue reading or reply
vlocity cpq learning
can anybody help/guide me on learning the vlocity cpq?
Thanks
-
- Manj_SFDC
- April 26, 2018
- Like
- 1
- Continue reading or reply
salesforce case
no-reply@salesforce.com), but no response
can someone help here
Thanks
-
- Manj_SFDC
- March 27, 2018
- Like
- 0
- Continue reading or reply
and symbol in validation rule error message
Thanks
-
- Manj_SFDC
- March 22, 2018
- Like
- 0
- Continue reading or reply
Platform Developer 2 Certification
I am completed the Multiple choice questions for Platform Developer 2 as well as the super badges, can someone help me to understand how do I get the certificate.
Thanks
-
- Manj_SFDC
- March 19, 2018
- Like
- 0
- Continue reading or reply
I have a list of reusable Test Classes , can I create an unmanaged package
Please suggest
-
- Manj_SFDC
- March 19, 2018
- Like
- 0
- Continue reading or reply
How can I schedule a report for every quarter in a year?
Please help
Thanks
-
- Manj_SFDC
- March 19, 2018
- Like
- 0
- Continue reading or reply
Advanced Apex Specialist Step 8 test coverage
I need a help on Advanced Apex Specialist Step 8 , I have created the test classes and all of them successfully executed , overall coverage is 86 however I am facing this issue.
Challenge Not yet complete... here's what's wrong:
Ensure that after you clear test data, you run your tests once and the required test coverage is achieved.
can anyone help
Thanks
-
- Manj_SFDC
- March 15, 2018
- Like
- 0
- Continue reading or reply
How to Split spring in the visual workflow?
Thanks
-
- Manj_SFDC
- March 12, 2018
- Like
- 0
- Continue reading or reply
Need help on parsing response from URL mapping
List <Account> accountList;
try {
accountList = [SELECT Id, Name,(SELECT Id, Name FROM Contacts) FROM Account];
return accountList;
}
in the RESTHandler I am getting the response as lsit of accounts with associated contacts , I need the count of number of accounts in the response, can someone help
-
- Manj_SFDC
- February 26, 2018
- Like
- 0
- Continue reading or reply
Challenge Not yet complete... here's what's wrong: We can't find the Map component in the right column of the Friends with Boats Lightning page.
I am working on step 10 of Lightning Component Framework Specialist and getting an error saying We can't find the Map component in the right column of the Friends with Boats Lightning page.when I click on check challenge, can anybody help me here.
Thank you
BoatSerachFormController.js
({
doInit : function(component, event, helper){
helper.loadBoatTypes(component);
},
handleChange : function(component, event, helper){
console.log(component.find("boatTypes").get("v.value"));
component.set("v.selectedType", component.find("boatTypes").get("v.value"));
},
search : function(component, event, helper){
var selectedType = component.get("v.selectedType");
console.log("Search button pressed " + selectedType)
},
newBoat : function(component, event, helper){
var boatTypeId = component.get("v.selectedType");
console.log("New button pressed " + boatTypeId);
var requestNewBoat = component.getEvent("launchNewBoatForm");
requestNewBoat.setParams({"boatTypeId": boatTypeId});
requestNewBoat.fire();
},
handleNewBoatForm: function(component, event, helper){
console.log("handleNewBoatForm handler called.")
var boatTypeId = component.get("v.selectedType");
console.log(boatTypeId);
var createNewBoat = $A.get("e.force:createRecord");
createNewBoat.setParams({
"entityApiName": "Boat__c",
})
if(! boatTypeId==""){
createNewBoat.setParams({
"defaultFieldValues": {'BoatType__c': boatTypeId}
})
}
createNewBoat.fire();
},
})
-
- Manj_SFDC
- February 05, 2018
- Like
- 0
- Continue reading or reply
vlocity cpq learning
can anybody help/guide me on learning the vlocity cpq?
Thanks
-
- Manj_SFDC
- April 26, 2018
- Like
- 1
- Continue reading or reply
Request a file Salesforce Chat
when the chat agent clicks on Request a file during a Salesforce Chat, he can choose a record to attach the file to, in my implementation it shows, Account, Contact and the case, do we have an option to hide these options and attach the file direclty to the case, please help, thanks!
- Manj_SFDC
- April 04, 2021
- Like
- 0
- Continue reading or reply
Unable to view Survey Invitation record in the customer community
Looks like there's a problem.
This record isn't supported. See your administrator for help.
- Manj_SFDC
- March 08, 2021
- Like
- 0
- Continue reading or reply
Too many query rows 50001 in schedule class
I have written an schedule class,in which when I run in production,it threw an error caused by: System.LimitException: Too many query rows: 50001
line 25, column 1
public void execute(SchedulableContext sc){
list<lead> myFive9LeadList=[ select id,name,Originating_System__c,createdDate,Call_Center_Disposition_Date__c,Call_Center_Disposition_Details__c from lead where Originating_System__c='Five9' AND createdDate >:X15MinutesAgo];
list<lead> mySparkroomLeadList=[ select id,name,Originating_System__c,createdDate from lead where Originating_System__c='Sparkroom' AND createdDate >:X15MinutesAgo];
//Line 25
list<lead> myLeadListDispositions=[ select id,name,Originating_System__c,createdDate from lead where Call_Center_Disposition_Details__c='Transfer' AND Call_Center_Disposition_Date__c >:X15MinutesAgo];
//For No Lead from Five9
if(myFive9LeadList.size()==0 ){
system.debug('Five9 List Size'+ myFive9LeadList.size());
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setToAddresses(toAddresses );
mail.setCcAddresses(ccAddresses);
mail.setSubject('Notification:: No Lead from Five9');
String messageBody = '<html><body>Hi, </body> <br/> Last 15 minutes no lead generated from Five9.<br/>Please look into Five9 lead process and make sure that it is working fine.<br/><br/>Thanks </html>
Thanks..
- Ashu sharma 38
- April 06, 2020
- Like
- 0
- Continue reading or reply
test class for sending Emails
I,m unable to get code coverage for sending emailnotification. can anyone help me. Thanks in advance
public class NotificationEmail {
public static void sendNotificationEmail(List<Account> newList2){
map<id,set<string>> AccRecp = new map<id,set<string>>();
for(Account acc2 : newList2)
{
if(acc2.Activity_Email__c != null && acc2.Activity_Email__c != '' && acc2.Status__c == true )
{
set<string> emailids = new set<string>();
list<string> templist = acc2.Activity_Email__c.split(',');
emailids.addALL(templist);
AccRecp.put(acc2.id,emailids);
}
}
if(!AccRecp.isEmpty())
{
EmailTemplate et = [ Select Body, HtmlValue, Id, Name, Subject from EmailTemplate where Name='Post Suspension' Limit 1];
List<Messaging.SingleEmailMessage> theEmails = new list<Messaging.SingleEmailMessage>();
for(Account ac: newList2)
{
if(AccRecp.containsKey(ac.id))
{
set<string> temp = AccRecp.get(ac.Id);
list<string> emaillist= new list<string>();
emaillist.add(label.Account_team);
emaillist.addAll(temp);
string body = et.Body;
OrgWideEmailAddress[] ar = [select Id,Address from OrgWideEmailAddress where Address = 'abc@company.com' ];
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setToAddresses(emaillist);
mail.setSubject(' Notice of Suspension-' +' '+ ac.Name);
mail.setOrgWideEmailAddressId(ar.get(0).id);
mail.setPlainTextBody(body);
theEmails.add(mail);
}
}
if(!theEmails.isEmpty())
{
list<Messaging.Email> allMails = new list<Messaging.Email>();
for( Integer j = 0; j < theEmails.size(); j++ ){
allMails.add(theEmails.get(j));
}
if(!allMails.isempty())
{
Messaging.SendEmailResult[] results = Messaging.sendEmail( allMails,false );
if (results[0].isSuccess()) {
system.debug('The email was sent successfully.');
} else {
system.debug('The email failed to send: '+results[0].getErrors());
}
}
}
}
}
- si ri
- February 19, 2019
- Like
- 0
- Continue reading or reply
how to pass wrapper class in batch class
- Saniya Khan 2
- February 18, 2019
- Like
- 0
- Continue reading or reply
how to roll up text values to the parent object via lookup
I wanted to roll up the 2 text fields of a child object into parent object how to that
Example : Value 1 + ' ' + Quality 1;
Value 2 + ' ' + Quality 2
Value 3 + ' ' + Quality 3
I wnated to rollup this vlaues to the parent obejct
- krishna 2619
- February 17, 2019
- Like
- 0
- Continue reading or reply
Daily emails based on date field in Account object (Apex Class) - help?
For example:
Vendor ABC Pty Ltd has opted in for reviews (Vendor Review: Reminders = true), has an annual review date set in their record (Vendor Review: Date = 17/02/2019), and an email address set in their record (Vendor Review: Email = abc@test.com).
Here is my code:
global class VendorReviewCronJob implements Schedulable{ global void execute(SchedulableContext SC) { sendmail(); } public List<Id> getVendorReviewEmailAddresses(Integer Month, Integer Day) { List<Id> mailToIds = new List<Id>(); Account[] a = [SELECT Id, Vendor_Review_Email__c, Vendor_Review_Date__c, Vendor_Review_Reminders__c FROM Account WHERE DAY_IN_MONTH(Vendor_Review_Date__c) = : Day AND CALENDAR_MONTH(Vendor_Review_Date__c) = : Month ]; for(Account recipient : a) { System.Debug('\n*******Found VendorReview Recipient'); if (recipient.Vendor_Review_Reminders__c == true) { mailToIds.add(recipient.Id); System.Debug('\n*******Recipient: '+ recipient.Vendor_Review_Email__c); } else { System.Debug('\n*******NO Recipient'); } } return mailToIds; } public void sendMail() { String debugAddress = 'eyewell@salesforce.com'; String VendorReviewEmailTemplateName = 'User_Vendor_Review_Required'; String debugMessage; String[] toAddresses; Integer DayOfEvent = date.today().day(); Integer MonthOfEvent = date.today().month(); List<Id> VendorReviewIdsList = getVendorReviewEmailAddresses(MonthOfEvent,DayOfEvent); EmailTemplate VendorReviewTemplate = [select Id,Name,Subject,body from EmailTemplate where DeveloperName = :VendorReviewEmailTemplateName]; if(VendorReviewTemplate != null && VendorReviewIdsList.isEmpty() == false) { Messaging.MassEmailMessage VendorReviewMail = new Messaging.MassEmailMessage(); VendorReviewMail.setTargetObjectIds(VendorReviewIdsList); VendorReviewMail.setTemplateId(VendorReviewTemplate.Id); VendorReviewMail.setUseSignature(false); VendorReviewMail.setSaveAsActivity(true); try { Messaging.sendEmail(new Messaging.MassEmailMessage[] { VendorReviewMail }); }catch(Exception e) { System.Debug(e); } } else { System.Debug('VendorReviewCronJob:sendMail(): Either an email template could not be found, or no Account has a Vendor Review today'); } } }I've scheduled the apex class to run daily, but although it's showing that it has run, the emails for the reviews due that day haven't sent, and I also haven't received the confirmation email of how many were sent.
Admittedly, I got the base of the code from a mailer that was checking for birthdays on a Contact object, but I felt the same principles still applied.
Can anybody see where I've gone wrong?
- Richard Rodriguez 1
- February 16, 2019
- Like
- 1
- Continue reading or reply
Testing to Development
Anykind of suggestions will be appreciated.
My apology if this not the correct platform to ask this question.
- Ankit Satnalika
- February 16, 2019
- Like
- 0
- Continue reading or reply
- Ankit Satnalika
- February 15, 2019
- Like
- 0
- Continue reading or reply
Email Template V.2
I am fairly new to Salesforce. I have encounter this issue and would like to see, is there anyone that can help me with this roadblock that I have encounter? Is there any documents, videos or anyone who can help me with pertaining to how to run a query to find email templates that contain a certain string ex: Pasta that would also include the subject line and content, and trigger if possible
- Micheal Mitchell
- February 13, 2019
- Like
- 0
- Continue reading or reply
How to send an image in email templates........?
I have custom field in account object, I put an image in that custom field.I want to send an email along with account name and that custom field using email templates how it is possible .....
what type of custom field I have to create & how to send an email Can you please help me.............................................................
- shaik ismail 7
- February 13, 2019
- Like
- 0
- Continue reading or reply
Which one to choose Workflow or process builder ?
- Open
- Working
- Close
For the above mentioned scenario what shall I choose, Workflow or Process builder.
- Ankit Satnalika
- February 13, 2019
- Like
- 0
- Continue reading or reply
Create Report Option for a single object
I have a custom object and Allow Reports is disabled on it, I would like to grant the permission to some of the users to create a report on that custom object , can it be done?
Thanks
- Manj_SFDC
- July 17, 2018
- Like
- 0
- Continue reading or reply