-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
30Questions
-
17Replies
Field Refrence
how to reference contact field from Account object in apex class??
Any Help
Thanks in advance
- Prince Venkat
- October 21, 2021
- Like
- 0
- Continue reading or reply
Specified Format
Hi
Whenever we click on edit on contact phone it should be displayed in this specified format (xxx) xxx-xxxx
but i am getting like this how can we achieve this
Whenever we click on edit on contact phone it should be displayed in this specified format (xxx) xxx-xxxx
but i am getting like this how can we achieve this
- Prince Venkat
- September 21, 2021
- Like
- 0
- Continue reading or reply
VF page PDF Preview
Hi All
I Have Stored a Image in Static resource and by using
<apex:image id="Logo5" value="{!$Resource.Logo5}" width="100%" />
I added in VF page
But the image should be displayed full , i marked with the yellow sketch those area also the image should occupy ,
How Can i achieve This ? , What changes should i make
Thanks In advance
I Have Stored a Image in Static resource and by using
<apex:image id="Logo5" value="{!$Resource.Logo5}" width="100%" />
I added in VF page
But the image should be displayed full , i marked with the yellow sketch those area also the image should occupy ,
How Can i achieve This ? , What changes should i make
Thanks In advance
- Prince Venkat
- September 20, 2021
- Like
- 0
- Continue reading or reply
Number Type Formula field
Number Type Formula Field
Criteria : (Create Date – Date of Birth)/365.2
Date of Birth is a field in the org
How to consider Create Date Here?
Thanks in advance
- Prince Venkat
- September 15, 2021
- Like
- 0
- Continue reading or reply
Formula Field for text Field
How to write a formula field fetching the first 3 digit of text field
Thanks in advance
Thanks in advance
- Prince Venkat
- September 15, 2021
- Like
- 0
- Continue reading or reply
Test class for parameters
How to add parameterized method in testclass.
My sample class
public class Training{
public static void work (Account accRec){
----------
-------
}
how to write test class for this
@isTest
private class testClass
{
testmethod static void myTest ()
{
test.starttest();
Training.work ();
test.stoptest();
}
}
getting error
Any Assistance
My sample class
public class Training{
public static void work (Account accRec){
----------
-------
}
how to write test class for this
@isTest
private class testClass
{
testmethod static void myTest ()
{
test.starttest();
Training.work ();
test.stoptest();
}
}
getting error
Any Assistance
- Prince Venkat
- August 05, 2021
- Like
- 0
- Continue reading or reply
Handler class
Create trigger handler on System
new record created When status includes mandatory email
map contact__r.email primary email
Record is deleted when status includes mandatory Email
contact__r.email removed from primary email
new record created When status includes mandatory email
map contact__r.email primary email
Record is deleted when status includes mandatory Email
contact__r.email removed from primary email
- Prince Venkat
- July 26, 2021
- Like
- 0
- Continue reading or reply
LWC Componet Css style
Hi
How to decrease the Actual width of Candidate Position,Candidate Location , Address Type, More width of Available, Flexible should be displayed
Thanks in advance
<div class='slds-grid slds-wrap' >
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Candidate Position">View Record</div>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Candiadate Location">Name</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Address Type">Address Type</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Location">Location</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Phone">Phone</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Email">Email</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Fax">Fax</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center; width: 150px; " title="Available">Available</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center; width: 150px; " title="Flexible ">Flexible</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Exceed Limit">Exceed Limit</div>
</th>
</div>
How to decrease the Actual width of Candidate Position,Candidate Location , Address Type, More width of Available, Flexible should be displayed
Thanks in advance
<div class='slds-grid slds-wrap' >
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Candidate Position">View Record</div>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Candiadate Location">Name</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Address Type">Address Type</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Location">Location</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Phone">Phone</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Email">Email</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Fax">Fax</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center; width: 150px; " title="Available">Available</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center; width: 150px; " title="Flexible ">Flexible</div>
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small" style="text-align:center" title="Exceed Limit">Exceed Limit</div>
</th>
</div>
- Prince Venkat
- July 05, 2021
- Like
- 0
- Continue reading or reply
LWC Request
Hi,
I have total ten fields which are displayed on the page.The page is designed using lwc .
Now the width between two particular fields should be increased and also the ten fields should be displayed. How to achieve
The displayed are displayed by
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div> -->
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="start Role"> Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="start Role">Role</div> -->
</th>
Any Assistance
Thanks in advance
I have total ten fields which are displayed on the page.The page is designed using lwc .
Now the width between two particular fields should be increased and also the ten fields should be displayed. How to achieve
The displayed are displayed by
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div> -->
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="start Role"> Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="start Role">Role</div> -->
</th>
Any Assistance
Thanks in advance
- Prince Venkat
- July 05, 2021
- Like
- 0
- Continue reading or reply
Lead conversion along with url change
Whenever Lead Record is Created and it is converted into opportunity. and then it should immediately change from lead page (00Q) to opportunity page URL (006) (Redirect from lead page to opportunity)
Below is my code.
Any assistance
public class LeadTriggerHandler
{
Public static void AfterUpdate(List<Lead> lstLeads)
{
LeadStatus lStatus = [Select id, MasterLabel, isConverted
from LeadStatus
Where isConverted = true];
List<Database.LeadConvert> leadsToConvert = new List<Database.LeadConvert>();
for(Lead ldRecord : lstLeads)
{
if(ldRecord.Status == 'Closed - Converted' && ldRecord.IsConverted == false)
{
Database.LeadConvert lConvert = new Database.LeadConvert();
lConvert.setLeadId(ldRecord.Id);
lConvert.setSendNotificationEmail(true);
lConvert.setDoNotCreateOpportunity(false);
lConvert.setConvertedStatus(lStatus.MasterLabel);
// Add the record to the Collection..
leadsToConvert.Add(lConvert);
}
}
if(! leadsToConvert.isEmpty())
{
Database.LeadConvertResult[] results = Database.convertLead(leadsToConvert);
}
}
}
Thank you
Below is my code.
Any assistance
public class LeadTriggerHandler
{
Public static void AfterUpdate(List<Lead> lstLeads)
{
LeadStatus lStatus = [Select id, MasterLabel, isConverted
from LeadStatus
Where isConverted = true];
List<Database.LeadConvert> leadsToConvert = new List<Database.LeadConvert>();
for(Lead ldRecord : lstLeads)
{
if(ldRecord.Status == 'Closed - Converted' && ldRecord.IsConverted == false)
{
Database.LeadConvert lConvert = new Database.LeadConvert();
lConvert.setLeadId(ldRecord.Id);
lConvert.setSendNotificationEmail(true);
lConvert.setDoNotCreateOpportunity(false);
lConvert.setConvertedStatus(lStatus.MasterLabel);
// Add the record to the Collection..
leadsToConvert.Add(lConvert);
}
}
if(! leadsToConvert.isEmpty())
{
Database.LeadConvertResult[] results = Database.convertLead(leadsToConvert);
}
}
}
Thank you
- Prince Venkat
- July 01, 2021
- Like
- 0
- Continue reading or reply
Lead conversion URL Redirect to Opportunity from Lead
Hi
Whenever Lead Record is Created and it is converted into opportunity. and then it should immediately change from lead page (00Q) to opportunity page URL (006) (Redirect from lead page to opportunity)
Below is my code.
Any assistance
public class LeadTriggerHandler
{
Public static void AfterUpdate(List<Lead> lstLeads)
{
LeadStatus lStatus = [Select id, MasterLabel, isConverted
from LeadStatus
Where isConverted = true];
List<Database.LeadConvert> leadsToConvert = new List<Database.LeadConvert>();
for(Lead ldRecord : lstLeads)
{
if(ldRecord.Status == 'Closed - Converted' && ldRecord.IsConverted == false)
{
Database.LeadConvert lConvert = new Database.LeadConvert();
lConvert.setLeadId(ldRecord.Id);
lConvert.setSendNotificationEmail(true);
lConvert.setDoNotCreateOpportunity(false);
lConvert.setConvertedStatus(lStatus.MasterLabel);
// Add the record to the Collection..
leadsToConvert.Add(lConvert);
}
}
if(! leadsToConvert.isEmpty())
{
Database.LeadConvertResult[] results = Database.convertLead(leadsToConvert);
}
}
}
Thank you
Whenever Lead Record is Created and it is converted into opportunity. and then it should immediately change from lead page (00Q) to opportunity page URL (006) (Redirect from lead page to opportunity)
Below is my code.
Any assistance
public class LeadTriggerHandler
{
Public static void AfterUpdate(List<Lead> lstLeads)
{
LeadStatus lStatus = [Select id, MasterLabel, isConverted
from LeadStatus
Where isConverted = true];
List<Database.LeadConvert> leadsToConvert = new List<Database.LeadConvert>();
for(Lead ldRecord : lstLeads)
{
if(ldRecord.Status == 'Closed - Converted' && ldRecord.IsConverted == false)
{
Database.LeadConvert lConvert = new Database.LeadConvert();
lConvert.setLeadId(ldRecord.Id);
lConvert.setSendNotificationEmail(true);
lConvert.setDoNotCreateOpportunity(false);
lConvert.setConvertedStatus(lStatus.MasterLabel);
// Add the record to the Collection..
leadsToConvert.Add(lConvert);
}
}
if(! leadsToConvert.isEmpty())
{
Database.LeadConvertResult[] results = Database.convertLead(leadsToConvert);
}
}
}
Thank you
- Prince Venkat
- June 30, 2021
- Like
- 0
- Continue reading or reply
Lead conversion based on record types
Hi
when ever lead record type called convert is selected it should convert into opportunity record type called general .
How to achieve this
Any assistance
Thank you
when ever lead record type called convert is selected it should convert into opportunity record type called general .
How to achieve this
Any assistance
Thank you
- Prince Venkat
- June 29, 2021
- Like
- 0
- Continue reading or reply
Lead Conversion Through Trigger
When ever a lead record is inserted automatically convert into account,contact,opportunity .Need to convert with a help of trigger.
Any Assistance
Thanks
Any Assistance
Thanks
- Prince Venkat
- June 24, 2021
- Like
- 0
- Continue reading or reply
Email through Apex
Hi
when ever we send an email it should be logged with an object activity.
How to achieve this
Thanks in advance
when ever we send an email it should be logged with an object activity.
How to achieve this
Thanks in advance
- Prince Venkat
- June 10, 2021
- Like
- 0
- Continue reading or reply
Apex Emails Testclass
Hi
Below is my code can anyone help with a testclass for it for max code coverage.
public class LeadEmail
{
public static void SendEmailTolead(list<lead> lstLead)
{
if(! lstLead.isEmpty())
{
list<messaging.SingleEmailMessage> lstEmails = new list<messaging.SingleEmailMessage>();
for(lead lr : lstLead)
{
messaging.SingleEmailMessage email = new messaging.SingleEmailMessage();
string[] toEmailsIds = new string[]{lr.Email};
email.settoAddresses(toEmailsIds);
email.setTargetObjectId( UserInfo.getUserId() );
email.setSaveAsActivity( false );
email.setSenderDisplayName('lead Record Creation Alert');
email.setReplyTo('support@RFI.com');
string emailsubject = 'congralutions'+lr.Name+'you have been registerd';
email.setSubject(emailsubject);
string emailHTMLContent = 'Dear'+lr.name+',<br/> <br/>'+
'<br/><br/> here are your details... <br/><br/>'+
'<br/> Your Company....'+lr.Company+
'<br/> Your tile for the Role'+lr.Title+
'<br/> your Status for The record'+lr.Status+
'thanks & Regards';
email.setHtmlBody(emailHTMLContent);
lstEmails.add(email);
}
if(!lstEmails.isempty())
{
Messaging.sendEmail(lstEmails); }
}
}
}
Thanks in advance
Below is my code can anyone help with a testclass for it for max code coverage.
public class LeadEmail
{
public static void SendEmailTolead(list<lead> lstLead)
{
if(! lstLead.isEmpty())
{
list<messaging.SingleEmailMessage> lstEmails = new list<messaging.SingleEmailMessage>();
for(lead lr : lstLead)
{
messaging.SingleEmailMessage email = new messaging.SingleEmailMessage();
string[] toEmailsIds = new string[]{lr.Email};
email.settoAddresses(toEmailsIds);
email.setTargetObjectId( UserInfo.getUserId() );
email.setSaveAsActivity( false );
email.setSenderDisplayName('lead Record Creation Alert');
email.setReplyTo('support@RFI.com');
string emailsubject = 'congralutions'+lr.Name+'you have been registerd';
email.setSubject(emailsubject);
string emailHTMLContent = 'Dear'+lr.name+',<br/> <br/>'+
'<br/><br/> here are your details... <br/><br/>'+
'<br/> Your Company....'+lr.Company+
'<br/> Your tile for the Role'+lr.Title+
'<br/> your Status for The record'+lr.Status+
'thanks & Regards';
email.setHtmlBody(emailHTMLContent);
lstEmails.add(email);
}
if(!lstEmails.isempty())
{
Messaging.sendEmail(lstEmails); }
}
}
}
Thanks in advance
- Prince Venkat
- June 10, 2021
- Like
- 0
- Continue reading or reply
Apex Emails
HI
Below is my code.
public class LeadEmail
{
public static void SendEmailTolead(list<lead> lstLead)
{
if(! lstLead.isEmpty())
{
list<messaging.SingleEmailMessage> lstEmails = new list<messaging.SingleEmailMessage>();
for(lead lr : lstLead)
{
messaging.SingleEmailMessage email = new messaging.SingleEmailMessage();
string[] toEmailsIds = new string[]{lr.Email};
email.settoAddresses(toEmailsIds);
email.setSenderDisplayName('lead Record Creation Alert');
email.setReplyTo('support@RFI.com');
string emailsubject = 'congralutions'+lr.Name+'you have been registerd';
email.setSubject(emailsubject);
string emailHTMLContent = 'Dear'+lr.name+',<br/> <br/>'+
'<br/><br/> here are your details... <br/><br/>'+
'<br/> Your Company....'+lr.Company+
'<br/> Your tile for the Role'+lr.Title+
'<br/> your Status for The record'+lr.Status+
'thanks & Regards';
email.setHtmlBody(emailHTMLContent);
lstEmails.add(email);
}
if(!lstEmails.isempty())
{
Messaging.sendEmail(lstEmails); }
}
}
}
Execute window
list<lead> lstLead = [select id,name,email,company,title,status from lead];
LeadEmail.SendEmailTolead(lstLead);
Getting error
Line: 38, Column: 1
System.EmailException: SendEmail failed. First exception on row 5; first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded: []
Any assistance
Thanks in advance
Below is my code.
public class LeadEmail
{
public static void SendEmailTolead(list<lead> lstLead)
{
if(! lstLead.isEmpty())
{
list<messaging.SingleEmailMessage> lstEmails = new list<messaging.SingleEmailMessage>();
for(lead lr : lstLead)
{
messaging.SingleEmailMessage email = new messaging.SingleEmailMessage();
string[] toEmailsIds = new string[]{lr.Email};
email.settoAddresses(toEmailsIds);
email.setSenderDisplayName('lead Record Creation Alert');
email.setReplyTo('support@RFI.com');
string emailsubject = 'congralutions'+lr.Name+'you have been registerd';
email.setSubject(emailsubject);
string emailHTMLContent = 'Dear'+lr.name+',<br/> <br/>'+
'<br/><br/> here are your details... <br/><br/>'+
'<br/> Your Company....'+lr.Company+
'<br/> Your tile for the Role'+lr.Title+
'<br/> your Status for The record'+lr.Status+
'thanks & Regards';
email.setHtmlBody(emailHTMLContent);
lstEmails.add(email);
}
if(!lstEmails.isempty())
{
Messaging.sendEmail(lstEmails); }
}
}
}
Execute window
list<lead> lstLead = [select id,name,email,company,title,status from lead];
LeadEmail.SendEmailTolead(lstLead);
Getting error
Line: 38, Column: 1
System.EmailException: SendEmail failed. First exception on row 5; first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded: []
Any assistance
Thanks in advance
- Prince Venkat
- June 09, 2021
- Like
- 0
- Continue reading or reply
Emails based on picklistfield
Hi
when ever picklist value changes in contact whenever leadsource changes to web batch apex should send an email
whenever leadsource changes to Phone Inquiry another email should send based on the email filed of the records
(Should be done through batch apex As it is be scheduled)
Thanks in advance
when ever picklist value changes in contact whenever leadsource changes to web batch apex should send an email
whenever leadsource changes to Phone Inquiry another email should send based on the email filed of the records
(Should be done through batch apex As it is be scheduled)
Thanks in advance
- Prince Venkat
- June 02, 2021
- Like
- 0
- Continue reading or reply
Batch Email code
Hi
Below is my code.Send mails to mailid field of contact object to three members at a time. Getting an error. System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Add a recipient to send an email.: []
global class EmailToContactBatch implements Database.Batchable<sObject>
{
global database.querylocator start(Database.BatchableContext BC)
{
return Database.getQueryLocator([select id,name,Email from Contact order by Email asc limit 3]);
}
global void execute(Database.BatchableContext BC, Sobject[] scope)
{
List<Messaging.SingleEmailMessage> lstEmails = new List<Messaging.SingleEmailMessage>();
for(Contact objContact :(List<contact>) scope)
{
Messaging.SingleEmailMessage objEmail = new Messaging.SingleEmailMessage();
//Prepare SendToEmail List
List<String> lstSendToEmails = new List<String>();
if(objContact.Email != null)
{
lstSendToEmails.add(objContact.Email);
}
objEmail.setToAddresses(lstSendToEmails);
//Prepare CCEmailList
List<String> lstCCToEmails = new List<String>();
if(objContact.Email != null)
{
lstCCToEmails.add(objContact.Email);
}
objEmail.setCcAddresses(lstCCToEmails);
//Set Email Subject
objEmail.setSubject('Testing Emails');
//Set Email Body
String body = 'Dear Contact,please ready to contact if you have any issues';
objEmail.setHtmlBody(body);
lstEmails.add(objEmail);
Messaging.sendEmail(lstEmails);
}
}
global void finish(Database.BatchableContext BC)
{
}
}
Thanks In advance
Below is my code.Send mails to mailid field of contact object to three members at a time. Getting an error. System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Add a recipient to send an email.: []
global class EmailToContactBatch implements Database.Batchable<sObject>
{
global database.querylocator start(Database.BatchableContext BC)
{
return Database.getQueryLocator([select id,name,Email from Contact order by Email asc limit 3]);
}
global void execute(Database.BatchableContext BC, Sobject[] scope)
{
List<Messaging.SingleEmailMessage> lstEmails = new List<Messaging.SingleEmailMessage>();
for(Contact objContact :(List<contact>) scope)
{
Messaging.SingleEmailMessage objEmail = new Messaging.SingleEmailMessage();
//Prepare SendToEmail List
List<String> lstSendToEmails = new List<String>();
if(objContact.Email != null)
{
lstSendToEmails.add(objContact.Email);
}
objEmail.setToAddresses(lstSendToEmails);
//Prepare CCEmailList
List<String> lstCCToEmails = new List<String>();
if(objContact.Email != null)
{
lstCCToEmails.add(objContact.Email);
}
objEmail.setCcAddresses(lstCCToEmails);
//Set Email Subject
objEmail.setSubject('Testing Emails');
//Set Email Body
String body = 'Dear Contact,please ready to contact if you have any issues';
objEmail.setHtmlBody(body);
lstEmails.add(objEmail);
Messaging.sendEmail(lstEmails);
}
}
global void finish(Database.BatchableContext BC)
{
}
}
Thanks In advance
- Prince Venkat
- May 31, 2021
- Like
- 0
- Continue reading or reply
Checkbox Field
Hi
Do not allow if the Student(object Name) is trying to update the Participated checkbox to 'true' after the activity end date.
For example :- if activity end date is 4th may 2020 then do not allow user to update the Participated checkbox field to true on 5th may 2020
- Prince Venkat
- May 27, 2021
- Like
- 0
- Continue reading or reply
Checkbox
Hi
I have object called Student Activities with field check box
whenever it is true it should update in another object field called Enrollment Limit (object name -Activity Master)
whenever checkbox is true value enrollment limit value should increase
whenever checkbox is false value enrollment limit value should decrease
(Through coding should be done)
Thanks in advance
I have object called Student Activities with field check box
whenever it is true it should update in another object field called Enrollment Limit (object name -Activity Master)
whenever checkbox is true value enrollment limit value should increase
whenever checkbox is false value enrollment limit value should decrease
(Through coding should be done)
Thanks in advance
- Prince Venkat
- May 27, 2021
- Like
- 0
- Continue reading or reply
Field Refrence
how to reference contact field from Account object in apex class??
Any Help
Thanks in advance
- Prince Venkat
- October 21, 2021
- Like
- 0
- Continue reading or reply
Specified Format
Hi
Whenever we click on edit on contact phone it should be displayed in this specified format (xxx) xxx-xxxx
but i am getting like this how can we achieve this
Whenever we click on edit on contact phone it should be displayed in this specified format (xxx) xxx-xxxx
but i am getting like this how can we achieve this
- Prince Venkat
- September 21, 2021
- Like
- 0
- Continue reading or reply
LWC Request
Hi,
I have total ten fields which are displayed on the page.The page is designed using lwc .
Now the width between two particular fields should be increased and also the ten fields should be displayed. How to achieve
The displayed are displayed by
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div> -->
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="start Role"> Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="start Role">Role</div> -->
</th>
Any Assistance
Thanks in advance
I have total ten fields which are displayed on the page.The page is designed using lwc .
Now the width between two particular fields should be increased and also the ten fields should be displayed. How to achieve
The displayed are displayed by
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="Finish Role">Role</div> -->
</th>
<th class="slds-size_1-of-10" scope="col">
<div class="slds-truncate" style="text-align:center" title="start Role"> Role</div>
<!-- <div class="slds-truncate" style="text-align:center" title="start Role">Role</div> -->
</th>
Any Assistance
Thanks in advance
- Prince Venkat
- July 05, 2021
- Like
- 0
- Continue reading or reply
Lead conversion based on record types
Hi
when ever lead record type called convert is selected it should convert into opportunity record type called general .
How to achieve this
Any assistance
Thank you
when ever lead record type called convert is selected it should convert into opportunity record type called general .
How to achieve this
Any assistance
Thank you
- Prince Venkat
- June 29, 2021
- Like
- 0
- Continue reading or reply
Apex Emails
HI
Below is my code.
public class LeadEmail
{
public static void SendEmailTolead(list<lead> lstLead)
{
if(! lstLead.isEmpty())
{
list<messaging.SingleEmailMessage> lstEmails = new list<messaging.SingleEmailMessage>();
for(lead lr : lstLead)
{
messaging.SingleEmailMessage email = new messaging.SingleEmailMessage();
string[] toEmailsIds = new string[]{lr.Email};
email.settoAddresses(toEmailsIds);
email.setSenderDisplayName('lead Record Creation Alert');
email.setReplyTo('support@RFI.com');
string emailsubject = 'congralutions'+lr.Name+'you have been registerd';
email.setSubject(emailsubject);
string emailHTMLContent = 'Dear'+lr.name+',<br/> <br/>'+
'<br/><br/> here are your details... <br/><br/>'+
'<br/> Your Company....'+lr.Company+
'<br/> Your tile for the Role'+lr.Title+
'<br/> your Status for The record'+lr.Status+
'thanks & Regards';
email.setHtmlBody(emailHTMLContent);
lstEmails.add(email);
}
if(!lstEmails.isempty())
{
Messaging.sendEmail(lstEmails); }
}
}
}
Execute window
list<lead> lstLead = [select id,name,email,company,title,status from lead];
LeadEmail.SendEmailTolead(lstLead);
Getting error
Line: 38, Column: 1
System.EmailException: SendEmail failed. First exception on row 5; first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded: []
Any assistance
Thanks in advance
Below is my code.
public class LeadEmail
{
public static void SendEmailTolead(list<lead> lstLead)
{
if(! lstLead.isEmpty())
{
list<messaging.SingleEmailMessage> lstEmails = new list<messaging.SingleEmailMessage>();
for(lead lr : lstLead)
{
messaging.SingleEmailMessage email = new messaging.SingleEmailMessage();
string[] toEmailsIds = new string[]{lr.Email};
email.settoAddresses(toEmailsIds);
email.setSenderDisplayName('lead Record Creation Alert');
email.setReplyTo('support@RFI.com');
string emailsubject = 'congralutions'+lr.Name+'you have been registerd';
email.setSubject(emailsubject);
string emailHTMLContent = 'Dear'+lr.name+',<br/> <br/>'+
'<br/><br/> here are your details... <br/><br/>'+
'<br/> Your Company....'+lr.Company+
'<br/> Your tile for the Role'+lr.Title+
'<br/> your Status for The record'+lr.Status+
'thanks & Regards';
email.setHtmlBody(emailHTMLContent);
lstEmails.add(email);
}
if(!lstEmails.isempty())
{
Messaging.sendEmail(lstEmails); }
}
}
}
Execute window
list<lead> lstLead = [select id,name,email,company,title,status from lead];
LeadEmail.SendEmailTolead(lstLead);
Getting error
Line: 38, Column: 1
System.EmailException: SendEmail failed. First exception on row 5; first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded: []
Any assistance
Thanks in advance
- Prince Venkat
- June 09, 2021
- Like
- 0
- Continue reading or reply
Batch Email code
Hi
Below is my code.Send mails to mailid field of contact object to three members at a time. Getting an error. System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Add a recipient to send an email.: []
global class EmailToContactBatch implements Database.Batchable<sObject>
{
global database.querylocator start(Database.BatchableContext BC)
{
return Database.getQueryLocator([select id,name,Email from Contact order by Email asc limit 3]);
}
global void execute(Database.BatchableContext BC, Sobject[] scope)
{
List<Messaging.SingleEmailMessage> lstEmails = new List<Messaging.SingleEmailMessage>();
for(Contact objContact :(List<contact>) scope)
{
Messaging.SingleEmailMessage objEmail = new Messaging.SingleEmailMessage();
//Prepare SendToEmail List
List<String> lstSendToEmails = new List<String>();
if(objContact.Email != null)
{
lstSendToEmails.add(objContact.Email);
}
objEmail.setToAddresses(lstSendToEmails);
//Prepare CCEmailList
List<String> lstCCToEmails = new List<String>();
if(objContact.Email != null)
{
lstCCToEmails.add(objContact.Email);
}
objEmail.setCcAddresses(lstCCToEmails);
//Set Email Subject
objEmail.setSubject('Testing Emails');
//Set Email Body
String body = 'Dear Contact,please ready to contact if you have any issues';
objEmail.setHtmlBody(body);
lstEmails.add(objEmail);
Messaging.sendEmail(lstEmails);
}
}
global void finish(Database.BatchableContext BC)
{
}
}
Thanks In advance
Below is my code.Send mails to mailid field of contact object to three members at a time. Getting an error. System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Add a recipient to send an email.: []
global class EmailToContactBatch implements Database.Batchable<sObject>
{
global database.querylocator start(Database.BatchableContext BC)
{
return Database.getQueryLocator([select id,name,Email from Contact order by Email asc limit 3]);
}
global void execute(Database.BatchableContext BC, Sobject[] scope)
{
List<Messaging.SingleEmailMessage> lstEmails = new List<Messaging.SingleEmailMessage>();
for(Contact objContact :(List<contact>) scope)
{
Messaging.SingleEmailMessage objEmail = new Messaging.SingleEmailMessage();
//Prepare SendToEmail List
List<String> lstSendToEmails = new List<String>();
if(objContact.Email != null)
{
lstSendToEmails.add(objContact.Email);
}
objEmail.setToAddresses(lstSendToEmails);
//Prepare CCEmailList
List<String> lstCCToEmails = new List<String>();
if(objContact.Email != null)
{
lstCCToEmails.add(objContact.Email);
}
objEmail.setCcAddresses(lstCCToEmails);
//Set Email Subject
objEmail.setSubject('Testing Emails');
//Set Email Body
String body = 'Dear Contact,please ready to contact if you have any issues';
objEmail.setHtmlBody(body);
lstEmails.add(objEmail);
Messaging.sendEmail(lstEmails);
}
}
global void finish(Database.BatchableContext BC)
{
}
}
Thanks In advance
- Prince Venkat
- May 31, 2021
- Like
- 0
- Continue reading or reply
MasterDetail Rollup
Hi
They are two objects Activity Master
Student Activities
Through programming want to create rollupsummary ( not through configuration)
Activity Master has a field No of Students Enrolled (count of records need to dispalyed here)
trigger Rollupmaster on Student_Activities__c (after insert,after update,after delete)
{
set<id> lstSet = new set<id>();
list<Activity_Master__c> lstAm = new list<Activity_Master__c>();
if((trigger.isinsert || trigger.isupdate)&& trigger.isafter)
{
for(Student_Activities__c c : trigger.new)
{
if(c.id!=null)
{
lstSet.add(c.id);
}
}
if(trigger.isdelete)
{
for(Student_Activities__c c : trigger.old)
{
lstSet.add(c.id);
}
}
for(Activity_Master__c a :[select id,No_of_Students_Enrolled__c,(select id from Student_Activities__r) from
Activity_Master__c where id =:lstSet])
{
a.No_of_Students_Enrolled__c = a.Student_Activities__r.size();
lstAm.add(a);
}
update lstAm;
}
}
Getting error in soql query Any suggestions.
They are two objects Activity Master
Student Activities
Through programming want to create rollupsummary ( not through configuration)
Activity Master has a field No of Students Enrolled (count of records need to dispalyed here)
trigger Rollupmaster on Student_Activities__c (after insert,after update,after delete)
{
set<id> lstSet = new set<id>();
list<Activity_Master__c> lstAm = new list<Activity_Master__c>();
if((trigger.isinsert || trigger.isupdate)&& trigger.isafter)
{
for(Student_Activities__c c : trigger.new)
{
if(c.id!=null)
{
lstSet.add(c.id);
}
}
if(trigger.isdelete)
{
for(Student_Activities__c c : trigger.old)
{
lstSet.add(c.id);
}
}
for(Activity_Master__c a :[select id,No_of_Students_Enrolled__c,(select id from Student_Activities__r) from
Activity_Master__c where id =:lstSet])
{
a.No_of_Students_Enrolled__c = a.Student_Activities__r.size();
lstAm.add(a);
}
update lstAm;
}
}
Getting error in soql query Any suggestions.
- Prince Venkat
- May 26, 2021
- Like
- 0
- Continue reading or reply
Batch Email
Hi
Through batch apex updating records
What ever mail id field present in lead object to those mail ids email should be sent through bacth apex how is it achieved
Thanks in advance
Regards
Prince
Through batch apex updating records
What ever mail id field present in lead object to those mail ids email should be sent through bacth apex how is it achieved
Thanks in advance
Regards
Prince
- Prince Venkat
- May 20, 2021
- Like
- 0
- Continue reading or reply
Batch Apex email Scheduling
Hi
when ever a record inserted by batch apex mail should be send to the respective owner how to achieve this
Thanks in advance
when ever a record inserted by batch apex mail should be send to the respective owner how to achieve this
Thanks in advance
- Prince Venkat
- May 18, 2021
- Like
- 0
- Continue reading or reply
Picklist Value should be displayed in anotherfield
Hi
I have a picklist field called Type whenever i select a field from type it should automatically display on the another field called Name
How to achieve this
Thanks in advance
I have a picklist field called Type whenever i select a field from type it should automatically display on the another field called Name
How to achieve this
Thanks in advance
- Prince Venkat
- April 30, 2021
- Like
- 0
- Continue reading or reply
Read csv file and insert records through batch apex
Hi
document obj contains a csv file
it should be read by batch apex and records shoud be inserted into an object
document obj contains a csv file
it should be read by batch apex and records shoud be inserted into an object
- Prince Venkat
- April 02, 2021
- Like
- 0
- Continue reading or reply