-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
3Questions
-
2Replies
Update/Input Metadata Descriptions and Help Texts in Bulk?
Hi All,
Does anyone know of a process or app that would allow me to update/input metedata decriptions and help texts in bulk?
I'd like to maintain consistent wording and tone throughout my app without having to edit each piece of metadata individually.
Thanks,
Mark
Does anyone know of a process or app that would allow me to update/input metedata decriptions and help texts in bulk?
I'd like to maintain consistent wording and tone throughout my app without having to edit each piece of metadata individually.
Thanks,
Mark
-
- Mark Nemith
- January 04, 2016
- Like
- 0
- Continue reading or reply
Inputting date parameter into Apex test class
Hi All,
I'm attempting a Trailhead challenge and it requires me to create a test class on a method that takes date parameters. See below:
...this is my first test method:
"Method does not exist or incorrect signature: VerifyDate.CheckDates(Integer, Integer)"
Please help.
Thanks,
Mark
I'm attempting a Trailhead challenge and it requires me to create a test class on a method that takes date parameters. See below:
public class VerifyDate { //method to handle potential checks against two dates public static Date CheckDates(Date date1, Date date2) { //if date2 is within the next 30 days of date1, use date2. Otherwise use the end of the month if(DateWithin30Days(date1,date2)) { return date2; } else { return SetEndOfMonthDate(date1); } } //method to check if date2 is within the next 30 days of date1 private static Boolean DateWithin30Days(Date date1, Date date2) { //check for date2 being in the past if( date2 < date1) { return false; } //check that date2 is within (>=) 30 days of date1 Date date30Days = date1.addDays(30); //create a date 30 days away from date1 if( date2 >= date30Days ) { return false; } else { return true; } } //method to return the end of the month of a given date private static Date SetEndOfMonthDate(Date date1) { Integer totalDays = Date.daysInMonth(date1.year(), date1.month()); Date lastDay = Date.newInstance(date1.year(), date1.month(), totalDays); return lastDay; } }
...this is my first test method:
@istest private class TestVerifyDate { @istest static void method1crit1 (){ Date method1res1 = VerifyDate.CheckDates(12/15/15,12/16/15); system.assertEquals(12/16/15,method1res1); } }...and I am getting the following error in the problems tab of the Dev Console:
"Method does not exist or incorrect signature: VerifyDate.CheckDates(Integer, Integer)"
Please help.
Thanks,
Mark
-
- Mark Nemith
- December 10, 2015
- Like
- 0
- Continue reading or reply
Apex Basics and Database Module along the Beginner Developer Trail: List Challenge
Hi All,
I am working with a fresh DE org with no customizations and I am continually failing the first unit of the Apex Basics and Database Module along the Beginner Developer Trail.
The Challenge is below:
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.
- The Apex class must be called 'StringArrayTest' and be in the public scope.
- The Apex class must have a public static method called 'generateStringArray'.
- The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
...and this is my failing solution:
...and here is the failure message:
"Challenge Not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings."
...All my returning debug values seem to be correct. Please help, if possible.
Thanks!
Mark
I am working with a fresh DE org with no customizations and I am continually failing the first unit of the Apex Basics and Database Module along the Beginner Developer Trail.
The Challenge is below:
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.
- The Apex class must be called 'StringArrayTest' and be in the public scope.
- The Apex class must have a public static method called 'generateStringArray'.
- The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
...and this is my failing solution:
public class StringArrayTest { public static void generateStringArray (Integer rs){ list<string> stringarray = new list<string>(); for(Integer n=0;n < rs;n++){ stringarray.add('Test ' + n); } string a = stringarray[0]; string b = stringarray[1]; string c = stringarray[2]; string d = stringarray[3]; system.debug(a); system.debug(b); system.debug(c); system.debug(d); integer y = stringarray.size(); system.debug(y); } }
...and here is the failure message:
"Challenge Not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings."
...All my returning debug values seem to be correct. Please help, if possible.
Thanks!
Mark
-
- Mark Nemith
- December 08, 2015
- Like
- 0
- Continue reading or reply
Inputting date parameter into Apex test class
Hi All,
I'm attempting a Trailhead challenge and it requires me to create a test class on a method that takes date parameters. See below:
...this is my first test method:
"Method does not exist or incorrect signature: VerifyDate.CheckDates(Integer, Integer)"
Please help.
Thanks,
Mark
I'm attempting a Trailhead challenge and it requires me to create a test class on a method that takes date parameters. See below:
public class VerifyDate { //method to handle potential checks against two dates public static Date CheckDates(Date date1, Date date2) { //if date2 is within the next 30 days of date1, use date2. Otherwise use the end of the month if(DateWithin30Days(date1,date2)) { return date2; } else { return SetEndOfMonthDate(date1); } } //method to check if date2 is within the next 30 days of date1 private static Boolean DateWithin30Days(Date date1, Date date2) { //check for date2 being in the past if( date2 < date1) { return false; } //check that date2 is within (>=) 30 days of date1 Date date30Days = date1.addDays(30); //create a date 30 days away from date1 if( date2 >= date30Days ) { return false; } else { return true; } } //method to return the end of the month of a given date private static Date SetEndOfMonthDate(Date date1) { Integer totalDays = Date.daysInMonth(date1.year(), date1.month()); Date lastDay = Date.newInstance(date1.year(), date1.month(), totalDays); return lastDay; } }
...this is my first test method:
@istest private class TestVerifyDate { @istest static void method1crit1 (){ Date method1res1 = VerifyDate.CheckDates(12/15/15,12/16/15); system.assertEquals(12/16/15,method1res1); } }...and I am getting the following error in the problems tab of the Dev Console:
"Method does not exist or incorrect signature: VerifyDate.CheckDates(Integer, Integer)"
Please help.
Thanks,
Mark
- Mark Nemith
- December 10, 2015
- Like
- 0
- Continue reading or reply
Apex Basics and Database Module along the Beginner Developer Trail: List Challenge
Hi All,
I am working with a fresh DE org with no customizations and I am continually failing the first unit of the Apex Basics and Database Module along the Beginner Developer Trail.
The Challenge is below:
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.
- The Apex class must be called 'StringArrayTest' and be in the public scope.
- The Apex class must have a public static method called 'generateStringArray'.
- The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
...and this is my failing solution:
...and here is the failure message:
"Challenge Not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings."
...All my returning debug values seem to be correct. Please help, if possible.
Thanks!
Mark
I am working with a fresh DE org with no customizations and I am continually failing the first unit of the Apex Basics and Database Module along the Beginner Developer Trail.
The Challenge is below:
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.
- The Apex class must be called 'StringArrayTest' and be in the public scope.
- The Apex class must have a public static method called 'generateStringArray'.
- The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
...and this is my failing solution:
public class StringArrayTest { public static void generateStringArray (Integer rs){ list<string> stringarray = new list<string>(); for(Integer n=0;n < rs;n++){ stringarray.add('Test ' + n); } string a = stringarray[0]; string b = stringarray[1]; string c = stringarray[2]; string d = stringarray[3]; system.debug(a); system.debug(b); system.debug(c); system.debug(d); integer y = stringarray.size(); system.debug(y); } }
...and here is the failure message:
"Challenge Not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings."
...All my returning debug values seem to be correct. Please help, if possible.
Thanks!
Mark
- Mark Nemith
- December 08, 2015
- Like
- 0
- Continue reading or reply