You need to sign in to do that
Don't have an account?
Yogesh Dighe.
Any problem in my SOQL Apex code.?
public class ContactSearch
{
public static List<Contact> searchForContacts(String s1, String s2)
{
String lnam = s1;
String mpc =s2;
Contact[] conlist = [SELECT ID, Name FROM Contact WHERE (LastName=:lnam AND MailingPostalCode=:mpc)];
List<Contact> conts = new List<Contact>();
conts = conlist;
return conts;
}
}
Above code cant gives me any error in my developer console, so why i cant completing the my Trailhead challenge succefully.??
it gives me following 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: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Error....: [] "
{
public static List<Contact> searchForContacts(String s1, String s2)
{
String lnam = s1;
String mpc =s2;
Contact[] conlist = [SELECT ID, Name FROM Contact WHERE (LastName=:lnam AND MailingPostalCode=:mpc)];
List<Contact> conts = new List<Contact>();
conts = conlist;
return conts;
}
}
Above code cant gives me any error in my developer console, so why i cant completing the my Trailhead challenge succefully.??
it gives me following 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: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Error....: [] "
Thanx,
you r right, and no need to try in other fresh DE.
actually my one trigger is giving me that problem, Then m just Inactive all my trigger which acts on Contact.
i got it now, m completed now my trailhead challenge :)
All Answers
Thanks for the feedback. Our internal team will help you to resolve this issue.
Thanks,
Pratik
i was asked quesion.
how can i resolve that problem.??
help me
Try this code.
Seems to be issue with De org, can you please try this on new/fresh DE org and let us know if you face any issues.
Thanks,
Pratik
I also just past your code, Still i geting the following error.. How can i complete my TRAILHEAD challenge.???
I can understand your problem as it;s not allowing you to complete the challenge. Is there any validation rules or any other rules that are conflicting? Also as i mentioned in my above post have you tried it in fresh DE org?
Thanks,
Pratik
Thanx,
you r right, and no need to try in other fresh DE.
actually my one trigger is giving me that problem, Then m just Inactive all my trigger which acts on Contact.
i got it now, m completed now my trailhead challenge :)