-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
16Questions
-
12Replies
How do I insert an image from a Rich Text field in an html email template
I have rich text area field with an image but when I am trying to include the field using the merge field in the html email template ...image is not displaying in email.Any ways to display image from richtext area field.
-
- RAMANJINEYULU GOGULA
- September 19, 2017
- Like
- 0
- Continue reading or reply
Text area rich field attachment is not appearing in sent email
Hi,
I'm uploading an image in Salesforce, where that field datatype is Text Area Rich, and I also gave that API name in Email Template.
But when I ever send an email, attachment is not sending and only text is passing. So can anybody help regarding this. How to showcase my attachment image in sent email?
I'm uploading an image in Salesforce, where that field datatype is Text Area Rich, and I also gave that API name in Email Template.
But when I ever send an email, attachment is not sending and only text is passing. So can anybody help regarding this. How to showcase my attachment image in sent email?
-
- RAMANJINEYULU GOGULA
- September 19, 2017
- Like
- 0
- Continue reading or reply
I want to schedule a report to contact object email fields
Please if you have any ideas, let me know.
In the report generator we can able to see drop down where, Run Report and Schedule Reports options avail.
While scheduling reports we can send emails to existed users and groups. But my case is to send reports to Email Id's that are present in Contact object.
So kindly share your ideas..
In the report generator we can able to see drop down where, Run Report and Schedule Reports options avail.
While scheduling reports we can send emails to existed users and groups. But my case is to send reports to Email Id's that are present in Contact object.
So kindly share your ideas..
-
- RAMANJINEYULU GOGULA
- July 11, 2017
- Like
- 0
- Continue reading or reply
Test class for Schedulable Batch class
Class::
global class Rfleet_C2GFRScheduledBatchable_SCH implements Schedulable{
global void execute(SchedulableContext sc) {
//added by murugan
//If the model, the version already exists in the R-FLEET product object but isn’t present in C2G return then the ‘Active’ checkbox on Product object isn’t ticked anymore
list<Product2>updateActive=new list<Product2>();
list<Product2> lsprodinactive=[Select IsActive from Product2 where CountryCode__c='FR'];
for(Product2 prod:lsprodinactive){
if(prod.IsActive==true){
prod.IsActive=false;
updateActive.add(prod);
}
}
update updateActive;
Rfleet_C2GProductDetails_BATCH frBatch = new Rfleet_C2GProductDetails_BATCH(label.Rfleet_FranceLabel.touppercase());
ID batchprocessid = Database.executeBatch(frBatch ,1);
}
}
Test Class:
@isTest
public class Rfleet_C2GDEScheduledBatchable_SCH_TEST {
@isTest static void c2GDEScheduleTest(){
Product2 p2=new Product2();
p2.Name='TEST';
p2.IsActive=TRUE;
p2.CountryCode__c='DE';
insert p2;
test.startTest();
Rfleet_C2GDEScheduledBatchable_SCH rcs=new Rfleet_C2GDEScheduledBatchable_SCH();
Rfleet_C2GProductDetails_BATCH deBatch = new Rfleet_C2GProductDetails_BATCH(label.Rfleet_germanyCountryCode.touppercase());
String schedule='0 0 * * * ?';
System.schedule('TEST C2GDE', schedule, rcs);
//stem.scheduleBatch('deBatch','TEST C2GDE', 0,1);
test.stopTest();
}
}
Here everything is covering except " ID batchprocessid = Database.executeBatch(frBatch ,1); "
Can any1 answer it ?
global class Rfleet_C2GFRScheduledBatchable_SCH implements Schedulable{
global void execute(SchedulableContext sc) {
//added by murugan
//If the model, the version already exists in the R-FLEET product object but isn’t present in C2G return then the ‘Active’ checkbox on Product object isn’t ticked anymore
list<Product2>updateActive=new list<Product2>();
list<Product2> lsprodinactive=[Select IsActive from Product2 where CountryCode__c='FR'];
for(Product2 prod:lsprodinactive){
if(prod.IsActive==true){
prod.IsActive=false;
updateActive.add(prod);
}
}
update updateActive;
Rfleet_C2GProductDetails_BATCH frBatch = new Rfleet_C2GProductDetails_BATCH(label.Rfleet_FranceLabel.touppercase());
ID batchprocessid = Database.executeBatch(frBatch ,1);
}
}
Test Class:
@isTest
public class Rfleet_C2GDEScheduledBatchable_SCH_TEST {
@isTest static void c2GDEScheduleTest(){
Product2 p2=new Product2();
p2.Name='TEST';
p2.IsActive=TRUE;
p2.CountryCode__c='DE';
insert p2;
test.startTest();
Rfleet_C2GDEScheduledBatchable_SCH rcs=new Rfleet_C2GDEScheduledBatchable_SCH();
Rfleet_C2GProductDetails_BATCH deBatch = new Rfleet_C2GProductDetails_BATCH(label.Rfleet_germanyCountryCode.touppercase());
String schedule='0 0 * * * ?';
System.schedule('TEST C2GDE', schedule, rcs);
//stem.scheduleBatch('deBatch','TEST C2GDE', 0,1);
test.stopTest();
}
}
Here everything is covering except " ID batchprocessid = Database.executeBatch(frBatch ,1); "
Can any1 answer it ?
-
- RAMANJINEYULU GOGULA
- July 07, 2017
- Like
- 0
- Continue reading or reply
Can anyone help me writing test class for this code
public with sharing class Rfleet_DEListofUnitOrderRPT_TRG {
public static void onAfterUpdate(Map<Id,CST_Carset__c> mcarsets){
string cstRectype=null;
string strCodeconcat1to9=null;
string strCodeconcat10to18=null;
List<CST_Carset__c> lsupdateCarSet=new list<CST_Carset__c>();
for (Rfleet_CountryInfo__c setting : Rfleet_CountryInfo__c.getAll().values()){
if(setting.Name=='DE'){
cstRectype=setting.Rfleet_CST_RecordType__c;
}
}
system.debug('$##'+cstRectype);
Id cstrectyprId = Schema.SObjectType.CST_Carset__c.RecordTypeInfosByName.get(cstRectype).RecordTypeId;
system.debug('$##'+cstrectyprId);
List<CST_Carset__c> listCarSet = new list<CST_Carset__c>([select Id,Optionscodes10_18__c,Optionscodes1_9__c,(select code__c,servicetype__c from services__r) from CST_Carset__c where id =:mcarsets.keySet()]
);
for(CST_Carset__c cstoption:listCarSet){
system.debug('cstoption .services__r.size()>>>'+cstoption.services__r.size());
integer j=0;
integer k=0;
integer count=0;
for(Integer i=0;i<cstoption.services__r.size();i++) {
if(cstoption.services__r[i].servicetype__c=='Option' && count<8) {
if(cstoption.services__r[i].code__c!=null) {
if(j==0){
strCodeconcat1to9=cstoption.services__r[i].code__c+' ';
j++;
}else{
strCodeconcat1to9+=cstoption.services__r[i].code__c+' ';
}
}
count++;
System.debug('if count:::'+count);
}else if(cstoption.services__r[i].servicetype__c=='Option'){
if(cstoption.services__r[i].code__c!=null) {
if(k==0){
strCodeconcat10to18=cstoption.services__r[i].code__c+' ';
k++;
}else{
strCodeconcat10to18+=cstoption.services__r[i].code__c+' ';
}
}
}
cstoption.Optionscodes1_9__c=strCodeconcat1to9;
cstoption.Optionscodes10_18__c=strCodeconcat10to18;
}
System.debug('Codeconcat1to9:::'+strCodeconcat1to9);
System.debug('Codeconcat10to18'+strCodeconcat10to18);
lsupdateCarSet.add(cstoption);
}
try{
update lsupdateCarSet;
}catch(Exception ex) {
system.debug('## Exception occured::'+ ex);
}
}
}
public static void onAfterUpdate(Map<Id,CST_Carset__c> mcarsets){
string cstRectype=null;
string strCodeconcat1to9=null;
string strCodeconcat10to18=null;
List<CST_Carset__c> lsupdateCarSet=new list<CST_Carset__c>();
for (Rfleet_CountryInfo__c setting : Rfleet_CountryInfo__c.getAll().values()){
if(setting.Name=='DE'){
cstRectype=setting.Rfleet_CST_RecordType__c;
}
}
system.debug('$##'+cstRectype);
Id cstrectyprId = Schema.SObjectType.CST_Carset__c.RecordTypeInfosByName.get(cstRectype).RecordTypeId;
system.debug('$##'+cstrectyprId);
List<CST_Carset__c> listCarSet = new list<CST_Carset__c>([select Id,Optionscodes10_18__c,Optionscodes1_9__c,(select code__c,servicetype__c from services__r) from CST_Carset__c where id =:mcarsets.keySet()]
);
for(CST_Carset__c cstoption:listCarSet){
system.debug('cstoption .services__r.size()>>>'+cstoption.services__r.size());
integer j=0;
integer k=0;
integer count=0;
for(Integer i=0;i<cstoption.services__r.size();i++) {
if(cstoption.services__r[i].servicetype__c=='Option' && count<8) {
if(cstoption.services__r[i].code__c!=null) {
if(j==0){
strCodeconcat1to9=cstoption.services__r[i].code__c+' ';
j++;
}else{
strCodeconcat1to9+=cstoption.services__r[i].code__c+' ';
}
}
count++;
System.debug('if count:::'+count);
}else if(cstoption.services__r[i].servicetype__c=='Option'){
if(cstoption.services__r[i].code__c!=null) {
if(k==0){
strCodeconcat10to18=cstoption.services__r[i].code__c+' ';
k++;
}else{
strCodeconcat10to18+=cstoption.services__r[i].code__c+' ';
}
}
}
cstoption.Optionscodes1_9__c=strCodeconcat1to9;
cstoption.Optionscodes10_18__c=strCodeconcat10to18;
}
System.debug('Codeconcat1to9:::'+strCodeconcat1to9);
System.debug('Codeconcat10to18'+strCodeconcat10to18);
lsupdateCarSet.add(cstoption);
}
try{
update lsupdateCarSet;
}catch(Exception ex) {
system.debug('## Exception occured::'+ ex);
}
}
}
-
- RAMANJINEYULU GOGULA
- June 19, 2017
- Like
- 0
- Continue reading or reply
how to execute if/else statements in batch apex execute method?
You can observe here, it is executing but not affecting any changes in the records, please help me out?
public class ramsBatchTownName implements Database.Batchable<sObject> {
public String field;
public String v1,v2,v3,v4,v5;
public String query;
public ramsBatchTownName(String q){
field='Address__c';
v1='KKM';
v2='MDP';
v3='NAND';
v4='PLVD';
v5='NO ADDRESS';
query=q;
}
public Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
public void execute(Database.BatchableContext BC, List<Ram__c> batch){
for(Ram__c rc:batch){
if(rc.Districts__c=='Anantapur')
rc.put(field,v1);
else if(rc.Districts__c=='Chittor')
rc.put(field,v2);
else if(rc.Districts__c=='Kurnool')
rc.put(field,v3);
else if(rc.Districts__c=='Kadapa')
rc.put(field,v4);
}
update batch;
}
public void finish(Database.BatchableContext BC){
}
}
public class ramsBatchTownName implements Database.Batchable<sObject> {
public String field;
public String v1,v2,v3,v4,v5;
public String query;
public ramsBatchTownName(String q){
field='Address__c';
v1='KKM';
v2='MDP';
v3='NAND';
v4='PLVD';
v5='NO ADDRESS';
query=q;
}
public Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
public void execute(Database.BatchableContext BC, List<Ram__c> batch){
for(Ram__c rc:batch){
if(rc.Districts__c=='Anantapur')
rc.put(field,v1);
else if(rc.Districts__c=='Chittor')
rc.put(field,v2);
else if(rc.Districts__c=='Kurnool')
rc.put(field,v3);
else if(rc.Districts__c=='Kadapa')
rc.put(field,v4);
}
update batch;
}
public void finish(Database.BatchableContext BC){
}
}
-
- RAMANJINEYULU GOGULA
- May 18, 2017
- Like
- 0
- Continue reading or reply
how to put wrapper class(multiple object) fields side by side
I want to keep 4 coloumns as Name, PhoneNumber, OrderName(oName), PaymentAmount.
Controller:
public class multiwrapper
{
public class multiInfo
{
public String Name {get;set;}
public String phNum {get;set;}
public String oName {get;set;}
public Decimal payment{get;set;}
}
public List<multiInfo> aldata{get;set;}
public multiwrapper()
{
aldata = new List<multiInfo>();
multiInfo mi;
for(PersonInfo__c pi:[SELECT Name,Phone_Number__c FROM PersonInfo__c])
{
mi=new multiInfo();
mi.Name = pi.Name;
mi.phNum = pi.Phone_Number__c;
aldata.add(mi);
}
for(Order__c oc:[SELECT Name,Payment_Amount__c FROM Order__c])
{
mi=new multiInfo();
mi.oName = oc.Name;
mi.payment = oc.Payment_Amount__c;
aldata.add(mi);
}
}
}
VF Page:
<apex:page sidebar="false" controller="multiwrapper" standardStylesheets="false">
<style>
h1
{
background-color:pink;font-size:44px;font-family:Mistral;
}
</style>
<center>
<h1>Multi-Object Wrapper</h1>
</center>
<table>
<tr>
<th>Name</th>
<th>Phone Number</th>
<th>Order Name</th>
<th>Payment Amount</th>
</tr>
<apex:repeat value="{!aldata}" var="dat">
<tr>
<td><apex:outputText value="{!dat.Name}"></apex:outputText></td>
<td><apex:outputText value="{!dat.phNum}"></apex:outputText></td>
<td><apex:outputText value=" {!dat.oName}"></apex:outputText></td>
<td><apex:outputText value=" {!dat.payment}"></apex:outputText></td>
</tr>
</apex:repeat>
</table>
</apex:page>
Controller:
public class multiwrapper
{
public class multiInfo
{
public String Name {get;set;}
public String phNum {get;set;}
public String oName {get;set;}
public Decimal payment{get;set;}
}
public List<multiInfo> aldata{get;set;}
public multiwrapper()
{
aldata = new List<multiInfo>();
multiInfo mi;
for(PersonInfo__c pi:[SELECT Name,Phone_Number__c FROM PersonInfo__c])
{
mi=new multiInfo();
mi.Name = pi.Name;
mi.phNum = pi.Phone_Number__c;
aldata.add(mi);
}
for(Order__c oc:[SELECT Name,Payment_Amount__c FROM Order__c])
{
mi=new multiInfo();
mi.oName = oc.Name;
mi.payment = oc.Payment_Amount__c;
aldata.add(mi);
}
}
}
VF Page:
<apex:page sidebar="false" controller="multiwrapper" standardStylesheets="false">
<style>
h1
{
background-color:pink;font-size:44px;font-family:Mistral;
}
</style>
<center>
<h1>Multi-Object Wrapper</h1>
</center>
<table>
<tr>
<th>Name</th>
<th>Phone Number</th>
<th>Order Name</th>
<th>Payment Amount</th>
</tr>
<apex:repeat value="{!aldata}" var="dat">
<tr>
<td><apex:outputText value="{!dat.Name}"></apex:outputText></td>
<td><apex:outputText value="{!dat.phNum}"></apex:outputText></td>
<td><apex:outputText value=" {!dat.oName}"></apex:outputText></td>
<td><apex:outputText value=" {!dat.payment}"></apex:outputText></td>
</tr>
</apex:repeat>
</table>
</apex:page>
-
- RAMANJINEYULU GOGULA
- October 27, 2016
- Like
- 0
- Continue reading or reply
I want to fetch value from one method to another method
public with sharing class salescontroller
{
public string dat='this month';
public Integer leadcount{ get; set; }
public Integer getCountings()
{
Integer counts=[SELECT COUNT() FROM Lead];
leadcount=counts;
return counts;
}
public List<Lead> getCurrentMonthInfo()
{
List<Lead> ll=Database.query('SELECT Id,Name,Division_Name__c,Title,counting__c '+ 'FROM Lead');
return ll;
}
}
I need to transfer count value from getCountings() to getCurrentMonthInfo() and retrieve count variable value in this, Could anyone can solve this plz??
{
public string dat='this month';
public Integer leadcount{ get; set; }
public Integer getCountings()
{
Integer counts=[SELECT COUNT() FROM Lead];
leadcount=counts;
return counts;
}
public List<Lead> getCurrentMonthInfo()
{
List<Lead> ll=Database.query('SELECT Id,Name,Division_Name__c,Title,counting__c '+ 'FROM Lead');
return ll;
}
}
I need to transfer count value from getCountings() to getCurrentMonthInfo() and retrieve count variable value in this, Could anyone can solve this plz??
-
- RAMANJINEYULU GOGULA
- July 28, 2016
- Like
- 0
- Continue reading or reply
Trail head SOQL Question
public class ContactSearch
{
public static List<Contact> searchForContacts(String s1, String s2)
{
ContactSearch cs=new ContactSearch();
List<String> s3=new List<String>{s1,s2};
s3[0]=s1;
s3[1]=s2;
System.debug(s3);
List<String> sr=new String[]{''+[SELECT LastName FROM Contact],''+[SELECT MailingPostalCode FROM Contact]};
if(s1==s3[0] && s2==s3[1])
{
List<Contact> result=new List<Contact>();
Contact[] query=[SELECT Id,FirstName,LastName FROM Contact WHERE LastName=:s1 AND MailingPostalCode=:s2];
System.debug(query);
}
List<Contact> result=new List<Contact>();
return result;
}
}
This is the code developed by me, it is running but unable to pass the trailhead challenge?
{
public static List<Contact> searchForContacts(String s1, String s2)
{
ContactSearch cs=new ContactSearch();
List<String> s3=new List<String>{s1,s2};
s3[0]=s1;
s3[1]=s2;
System.debug(s3);
List<String> sr=new String[]{''+[SELECT LastName FROM Contact],''+[SELECT MailingPostalCode FROM Contact]};
if(s1==s3[0] && s2==s3[1])
{
List<Contact> result=new List<Contact>();
Contact[] query=[SELECT Id,FirstName,LastName FROM Contact WHERE LastName=:s1 AND MailingPostalCode=:s2];
System.debug(query);
}
List<Contact> result=new List<Contact>();
return result;
}
}
This is the code developed by me, it is running but unable to pass the trailhead challenge?
-
- RAMANJINEYULU GOGULA
- July 21, 2016
- Like
- 0
- Continue reading or reply
I have Email class file which sends email to dynamic users, I want to build visualforce page for that class file inorder to receive data from users.
In VF Page, I want these three fields ToAddress, Subject and Body.
I want to know how to integrate of this VF Page to the Email class file.
If anyone have models, kindly let me know.
I want to know how to integrate of this VF Page to the Email class file.
If anyone have models, kindly let me know.
-
- RAMANJINEYULU GOGULA
- July 18, 2016
- Like
- 0
- Continue reading or reply
what is the extension of visualforce?
For HTML we do make file with .html
Like wise for visualforce?
-
- RAMANJINEYULU GOGULA
- May 12, 2016
- Like
- 0
- Continue reading or reply
I am unable to proceed with trailhead question
Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [ContactField__c]: [ContactField__c]
Getting above error..while submitting an assignment.
Question: Create a rollup summary field that determines the potential value of the opportunities associated with an account.
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [ContactField__c]: [ContactField__c]
Getting above error..while submitting an assignment.
Question: Create a rollup summary field that determines the potential value of the opportunities associated with an account.
-
- RAMANJINEYULU GOGULA
- May 11, 2016
- Like
- 0
- Continue reading or reply
Unable map lead standard fields to opportunity custom fields
Initially I copied lead fields into lead custom fields after that I'm trying map Name and Email fields to Opportunity custom fields..
trigger mapping on Lead (after update)
{
Opportunity opp=new Opportunity();
for(Lead ll:Trigger.New)
{
if(ll.isconverted==true)
{
opp.Client_Name__c=ll.Name;
opp.Client_Email__c=ll.Email;
}
insert opp;
}
}
This is working but opportunity fields not getting added.
trigger mapping on Lead (after update)
{
Opportunity opp=new Opportunity();
for(Lead ll:Trigger.New)
{
if(ll.isconverted==true)
{
opp.Client_Name__c=ll.Name;
opp.Client_Email__c=ll.Email;
}
insert opp;
}
}
This is working but opportunity fields not getting added.
-
- RAMANJINEYULU GOGULA
- May 02, 2016
- Like
- 0
- Continue reading or reply
Regarding dot notation
How can I retrieve object records using dot notation?
Please specify with examples for some standard or custom objects.
Please specify with examples for some standard or custom objects.
-
- RAMANJINEYULU GOGULA
- March 21, 2016
- Like
- 0
- Continue reading or reply
While I am checking assignment from the trail head, I am getting this error.
Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Process failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, missing required field: [nextApproverIds]: [nextApproverIds].
Please help me to get out of it, everything I followed according to the question. But why it is showing like this?
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Process failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, missing required field: [nextApproverIds]: [nextApproverIds].
Please help me to get out of it, everything I followed according to the question. But why it is showing like this?
-
- RAMANJINEYULU GOGULA
- March 14, 2016
- Like
- 0
- Continue reading or reply
Text area rich field attachment is not appearing in sent email
Hi,
I'm uploading an image in Salesforce, where that field datatype is Text Area Rich, and I also gave that API name in Email Template.
But when I ever send an email, attachment is not sending and only text is passing. So can anybody help regarding this. How to showcase my attachment image in sent email?
I'm uploading an image in Salesforce, where that field datatype is Text Area Rich, and I also gave that API name in Email Template.
But when I ever send an email, attachment is not sending and only text is passing. So can anybody help regarding this. How to showcase my attachment image in sent email?
- RAMANJINEYULU GOGULA
- September 19, 2017
- Like
- 0
- Continue reading or reply
how to execute if/else statements in batch apex execute method?
You can observe here, it is executing but not affecting any changes in the records, please help me out?
public class ramsBatchTownName implements Database.Batchable<sObject> {
public String field;
public String v1,v2,v3,v4,v5;
public String query;
public ramsBatchTownName(String q){
field='Address__c';
v1='KKM';
v2='MDP';
v3='NAND';
v4='PLVD';
v5='NO ADDRESS';
query=q;
}
public Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
public void execute(Database.BatchableContext BC, List<Ram__c> batch){
for(Ram__c rc:batch){
if(rc.Districts__c=='Anantapur')
rc.put(field,v1);
else if(rc.Districts__c=='Chittor')
rc.put(field,v2);
else if(rc.Districts__c=='Kurnool')
rc.put(field,v3);
else if(rc.Districts__c=='Kadapa')
rc.put(field,v4);
}
update batch;
}
public void finish(Database.BatchableContext BC){
}
}
public class ramsBatchTownName implements Database.Batchable<sObject> {
public String field;
public String v1,v2,v3,v4,v5;
public String query;
public ramsBatchTownName(String q){
field='Address__c';
v1='KKM';
v2='MDP';
v3='NAND';
v4='PLVD';
v5='NO ADDRESS';
query=q;
}
public Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
public void execute(Database.BatchableContext BC, List<Ram__c> batch){
for(Ram__c rc:batch){
if(rc.Districts__c=='Anantapur')
rc.put(field,v1);
else if(rc.Districts__c=='Chittor')
rc.put(field,v2);
else if(rc.Districts__c=='Kurnool')
rc.put(field,v3);
else if(rc.Districts__c=='Kadapa')
rc.put(field,v4);
}
update batch;
}
public void finish(Database.BatchableContext BC){
}
}
- RAMANJINEYULU GOGULA
- May 18, 2017
- Like
- 0
- Continue reading or reply
I want to fetch value from one method to another method
public with sharing class salescontroller
{
public string dat='this month';
public Integer leadcount{ get; set; }
public Integer getCountings()
{
Integer counts=[SELECT COUNT() FROM Lead];
leadcount=counts;
return counts;
}
public List<Lead> getCurrentMonthInfo()
{
List<Lead> ll=Database.query('SELECT Id,Name,Division_Name__c,Title,counting__c '+ 'FROM Lead');
return ll;
}
}
I need to transfer count value from getCountings() to getCurrentMonthInfo() and retrieve count variable value in this, Could anyone can solve this plz??
{
public string dat='this month';
public Integer leadcount{ get; set; }
public Integer getCountings()
{
Integer counts=[SELECT COUNT() FROM Lead];
leadcount=counts;
return counts;
}
public List<Lead> getCurrentMonthInfo()
{
List<Lead> ll=Database.query('SELECT Id,Name,Division_Name__c,Title,counting__c '+ 'FROM Lead');
return ll;
}
}
I need to transfer count value from getCountings() to getCurrentMonthInfo() and retrieve count variable value in this, Could anyone can solve this plz??
- RAMANJINEYULU GOGULA
- July 28, 2016
- Like
- 0
- Continue reading or reply
Trail head SOQL Question
public class ContactSearch
{
public static List<Contact> searchForContacts(String s1, String s2)
{
ContactSearch cs=new ContactSearch();
List<String> s3=new List<String>{s1,s2};
s3[0]=s1;
s3[1]=s2;
System.debug(s3);
List<String> sr=new String[]{''+[SELECT LastName FROM Contact],''+[SELECT MailingPostalCode FROM Contact]};
if(s1==s3[0] && s2==s3[1])
{
List<Contact> result=new List<Contact>();
Contact[] query=[SELECT Id,FirstName,LastName FROM Contact WHERE LastName=:s1 AND MailingPostalCode=:s2];
System.debug(query);
}
List<Contact> result=new List<Contact>();
return result;
}
}
This is the code developed by me, it is running but unable to pass the trailhead challenge?
{
public static List<Contact> searchForContacts(String s1, String s2)
{
ContactSearch cs=new ContactSearch();
List<String> s3=new List<String>{s1,s2};
s3[0]=s1;
s3[1]=s2;
System.debug(s3);
List<String> sr=new String[]{''+[SELECT LastName FROM Contact],''+[SELECT MailingPostalCode FROM Contact]};
if(s1==s3[0] && s2==s3[1])
{
List<Contact> result=new List<Contact>();
Contact[] query=[SELECT Id,FirstName,LastName FROM Contact WHERE LastName=:s1 AND MailingPostalCode=:s2];
System.debug(query);
}
List<Contact> result=new List<Contact>();
return result;
}
}
This is the code developed by me, it is running but unable to pass the trailhead challenge?
- RAMANJINEYULU GOGULA
- July 21, 2016
- Like
- 0
- Continue reading or reply
what is the extension of visualforce?
For HTML we do make file with .html
Like wise for visualforce?
- RAMANJINEYULU GOGULA
- May 12, 2016
- Like
- 0
- Continue reading or reply
I am unable to proceed with trailhead question
Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [ContactField__c]: [ContactField__c]
Getting above error..while submitting an assignment.
Question: Create a rollup summary field that determines the potential value of the opportunities associated with an account.
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [ContactField__c]: [ContactField__c]
Getting above error..while submitting an assignment.
Question: Create a rollup summary field that determines the potential value of the opportunities associated with an account.
- RAMANJINEYULU GOGULA
- May 11, 2016
- Like
- 0
- Continue reading or reply
While I am checking assignment from the trail head, I am getting this error.
Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Process failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, missing required field: [nextApproverIds]: [nextApproverIds].
Please help me to get out of it, everything I followed according to the question. But why it is showing like this?
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Process failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, missing required field: [nextApproverIds]: [nextApproverIds].
Please help me to get out of it, everything I followed according to the question. But why it is showing like this?
- RAMANJINEYULU GOGULA
- March 14, 2016
- Like
- 0
- Continue reading or reply
Trailhead: Coverage 100% but challenge failed
I have this very simple class..
When I run the Test class from the Developer Console I get 100% of coverage on the RestrictContactByName class but, when I check the challenge on the trailhead it returns the error:
Challenge not yet complete... here's what's wrong: The 'RestrictContactByName' class did not achieve 100% code coverage via your test methods
Has someone had my same issue?
trigger RestrictContactByName on Contact (before insert, before update) { //check contacts prior to insert or update for invalid data For (Contact c : Trigger.New) { if(c.LastName == 'INVALIDNAME') { //invalidname is invalid c.AddError('The Last Name "'+c.LastName+'" is not allowed for DML'); } } }.. and the corresponding Test Class:
@isTest private class TestRestrictContactByName { @isTest static void metodoTest() { List listaContatti = new List(); Contact c1 = new Contact(FirstName='Francesco', LastName='Riggio'); Contact c2 = new Contact(LastName = 'INVALIDNAME'); listaContatti.add(c1); listaContatti.add(c2); //insert listaContatti; // Perform test Test.startTest(); Database.SaveResult [] result = Database.insert(listaContatti, false); Test.stopTest(); c1.LastName = 'INVALIDNAME'; update c1; } }
When I run the Test class from the Developer Console I get 100% of coverage on the RestrictContactByName class but, when I check the challenge on the trailhead it returns the error:
Challenge not yet complete... here's what's wrong: The 'RestrictContactByName' class did not achieve 100% code coverage via your test methods
Has someone had my same issue?
- Andrea Ianni
- June 24, 2015
- Like
- 0
- Continue reading or reply