• Arpit Jain92
  • NEWBIE
  • 50 Points
  • Member since 2015
  • Software Engineer
  • Applikon It Solutions


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 18
    Replies
Hello All,

I am trying to complete a one of the task in Trailhead name if that is "Create a Unique Account List View" and I followed all the steps and everytime I getting error Industy type is not found but I already selected Industry still I am getting the same error and now I got this
"There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: JBBBXJJJ" even I tried to do this task in developer org and three other trailhead playground but it doesn't work.
Please help me out guys.

Thank You
Arpit.
Hi,

I am creating a vf page on which i need to show account,opportunity and opportunity contact role with a checkbox and a custom button(Clone). I need to clone all the selected records after click on this button.

I am new to Salesforce and have worked on this functionality for a long time. I would really appreciate your help on this functionaly. 
 
Hi,

I am writing a test class for a trigger, in that test class when I am getting this error when I write my login in system.runas method but when I write same login in another function it will work. "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, The formula in the "Room Certification Expiry Date" rule or process is invalid due to the following:<br/>Error evaluating formula field for time trigger date:  Room Certification: Expiry Date: " Please tell what is the issue.

Here is the code of Trigeer and test class-

Trigger:-
trigger RG_RoomCertificationExpiryDateUpdate on Room_Certification__c  (After insert,before update)
{    
List<Room_Certification__c > roomCertificationList=[select id,name,Certification_Date__c,Visit__r.Study__r.Study_Certificate_Duration__c from Room_Certification__c where id In:trigger.newMap.keySet()];
 
   if(Trigger.IsUpdate)
   {
    for(Room_Certification__c roomCert:roomCertificationList)
    {
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c=='Duration of Study')
        {
                trigger.newMap.get(roomCert.id).CertificationExpiryDate_String__c='Duration of Study';
        }
        
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!='Duration of Study' && roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!=null )
        {
                string monthh=roomCert.Visit__r.Study__r.Study_Certificate_Duration__c.removeEnd('m');
                system.debug('@@month'+monthh);
                Date dt=(trigger.newMap.get(roomCert.id).Certification_Date__c.AddMonths(Integer.ValueOf(monthh)))-1;
                system.debug('@@CalculatedDate'+dt);
                trigger.newMap.get(roomCert.id).CertificationExpiryDate_String__c=dt.format();
        }
    }
    }
    //After insert
    if(Trigger.IsInsert)
   {
    List<Room_Certification__c> exCertiChildUpdate=new List<Room_Certification__c>();
    for(Room_Certification__c roomCert:roomCertificationList)
    {
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c=='Duration of Study')
        {
                roomCert.CertificationExpiryDate_String__c='Duration of Study';
                exCertiChildUpdate.add(roomCert);
        }
        
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!='Duration of Study' && roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!=null )
        {
                string monthh=roomCert.Visit__r.Study__r.Study_Certificate_Duration__c.removeEnd('m');
                system.debug('@@month'+monthh);
                Date dt=(trigger.newMap.get(roomCert.id).Certification_Date__c.AddMonths(Integer.ValueOf(monthh)))-1;
                system.debug('@@CalculatedDate'+dt);
                roomCert.CertificationExpiryDate_String__c=dt.format();
                exCertiChildUpdate.add(roomCert);
        }
    }
    if (exCertiChildUpdate.isEmpty() == false)
    {
        Database.update(exCertiChildUpdate);
    }
    }
}
Test Class:-
@isTest
public class RG_RoomCertificationExpiryDate_Test
{
    public static testmethod void main()
    {
        //Client Create
        Account acc= new Account(Name='Test');
        insert acc;
        //Study Create
        Study__c study= new Study__c(Client__c=acc.id,Name='Testing',NumberofExaminerCertificationRounds__c=2,PONumber__c='123456',Study_Certificate_Duration__c='Duration of Study');
        insert study;
        //Site Create
        Site__c site= new Site__c(Name='Testing Site',Zip_Postal_Code__c='301001',City__c='Delhi');
        insert site;
        //Visit Create
        Visit__c Visit= new Visit__c(Study__c=study.id,Round__c=2,VisitType__c='Visit',VisitStatus__c='Contacted',SiteC__c=site.id,Study_Specific_Site_Number__c='123456');
        insert Visit;
        //Room Create
        Room__c Room= new Room__c(Room_Name__c='Test',SiteC__c=site.Id);
        insert Room;
        //Room Certification Create
        Room_Certification__c Rc= new Room_Certification__c(Room__c=Room.Id,Status__c='certified',Room_Certification_Round__c=2,Certification_Date__c=Date.Today(),VisitSite__c=site.id,Visit__c=Visit.Id);
        Insert Rc;
        study.Study_Certificate_Duration__c='6m';
        update study;
    }
    public static testmethod void main1()
    {
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User'];
        User u = new User(Alias = 'standt', Email='standarduser@testorg.com',
        EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',LocaleSidKey='en_US',ProfileId=p.Id,
        TimeZoneSidKey='America/Los_Angeles', UserName='Testingapexclass@gmail.com');
        system.RunAs(u)
        {
            //Client Create
            Account acc= new Account(Name='Test');
            insert acc;
            //Study Create
            Study__c study= new Study__c(Client__c=acc.id,Name='Testing',NumberofExaminerCertificationRounds__c=2,PONumber__c='123456',Study_Certificate_Duration__c='Duration of Study');
            insert study;
            //Site Create
            Site__c site= new Site__c(Name='Testing Site',Zip_Postal_Code__c='301001',City__c='Delhi');
            insert site;
            //Visit Create
            Visit__c Visit= new Visit__c(Study__c=study.id,Round__c=2,VisitType__c='Visit',VisitStatus__c='Contacted',SiteC__c=site.id,Study_Specific_Site_Number__c='123456');
            insert Visit;
            //Room Create
            Room__c Room= new Room__c(Room_Name__c='Test',SiteC__c=site.Id);
            insert Room;
            //Room Certification Create
            Room_Certification__c Rc= new Room_Certification__c(Room__c=Room.Id,Status__c='certified',Room_Certification_Round__c=2,Certification_Date__c=Date.Today(),VisitSite__c=site.id,Visit__c=Visit.Id);
            Insert Rc;
        }
    }
}
Hello,

I have a custom field on account, I want to updated that field with the latest contact name using trigger and the name of the contact is same as account name with some other values. like Account name is-ABC then contact name will be like ABC1, ABC2, ABC3. Pls help me out.

Thank You.
Arpit
Hello Guys,

After assigning any record to create for custom didn't get email, but when I tried to manually add a record to queue I got email..Why??

Thank You.
Arpit
Hi All,

Why a custom is not deleted that was in relationship?

Regards,
Arpit
Hi All,
Can we use one object in two applications?

Arpit Jain
Hello Everyone,
I am stuck here...Please tell me how to create a validation rule for this and can anyone explain this question.

To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).
1. Name the validation rule 'Contact must be in Account ZIP Code'.
2. A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be inserted.
3. The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANK function for this check)
Hello Everyone,

I reset one my user password but I didn't get any email via password. So pleae tell me how I can get the password?
I sthere anything else which I need to do for getting password??

Thank you.
Hello All,

I am trying to complete a one of the task in Trailhead name if that is "Create a Unique Account List View" and I followed all the steps and everytime I getting error Industy type is not found but I already selected Industry still I am getting the same error and now I got this
"There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: JBBBXJJJ" even I tried to do this task in developer org and three other trailhead playground but it doesn't work.
Please help me out guys.

Thank You
Arpit.
I am a working on Module 'Create a Unique Account List View' and I am recieving the following error when trying to complete the challege.  Does anyone have any suggestions?

There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: QMENALZG
User-added image
Hi,

I am creating a vf page on which i need to show account,opportunity and opportunity contact role with a checkbox and a custom button(Clone). I need to clone all the selected records after click on this button.

I am new to Salesforce and have worked on this functionality for a long time. I would really appreciate your help on this functionaly. 
 
Hi,

I am writing a test class for a trigger, in that test class when I am getting this error when I write my login in system.runas method but when I write same login in another function it will work. "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, The formula in the "Room Certification Expiry Date" rule or process is invalid due to the following:<br/>Error evaluating formula field for time trigger date:  Room Certification: Expiry Date: " Please tell what is the issue.

Here is the code of Trigeer and test class-

Trigger:-
trigger RG_RoomCertificationExpiryDateUpdate on Room_Certification__c  (After insert,before update)
{    
List<Room_Certification__c > roomCertificationList=[select id,name,Certification_Date__c,Visit__r.Study__r.Study_Certificate_Duration__c from Room_Certification__c where id In:trigger.newMap.keySet()];
 
   if(Trigger.IsUpdate)
   {
    for(Room_Certification__c roomCert:roomCertificationList)
    {
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c=='Duration of Study')
        {
                trigger.newMap.get(roomCert.id).CertificationExpiryDate_String__c='Duration of Study';
        }
        
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!='Duration of Study' && roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!=null )
        {
                string monthh=roomCert.Visit__r.Study__r.Study_Certificate_Duration__c.removeEnd('m');
                system.debug('@@month'+monthh);
                Date dt=(trigger.newMap.get(roomCert.id).Certification_Date__c.AddMonths(Integer.ValueOf(monthh)))-1;
                system.debug('@@CalculatedDate'+dt);
                trigger.newMap.get(roomCert.id).CertificationExpiryDate_String__c=dt.format();
        }
    }
    }
    //After insert
    if(Trigger.IsInsert)
   {
    List<Room_Certification__c> exCertiChildUpdate=new List<Room_Certification__c>();
    for(Room_Certification__c roomCert:roomCertificationList)
    {
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c=='Duration of Study')
        {
                roomCert.CertificationExpiryDate_String__c='Duration of Study';
                exCertiChildUpdate.add(roomCert);
        }
        
        if(roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!='Duration of Study' && roomCert.Visit__r.Study__r.Study_Certificate_Duration__c!=null )
        {
                string monthh=roomCert.Visit__r.Study__r.Study_Certificate_Duration__c.removeEnd('m');
                system.debug('@@month'+monthh);
                Date dt=(trigger.newMap.get(roomCert.id).Certification_Date__c.AddMonths(Integer.ValueOf(monthh)))-1;
                system.debug('@@CalculatedDate'+dt);
                roomCert.CertificationExpiryDate_String__c=dt.format();
                exCertiChildUpdate.add(roomCert);
        }
    }
    if (exCertiChildUpdate.isEmpty() == false)
    {
        Database.update(exCertiChildUpdate);
    }
    }
}
Test Class:-
@isTest
public class RG_RoomCertificationExpiryDate_Test
{
    public static testmethod void main()
    {
        //Client Create
        Account acc= new Account(Name='Test');
        insert acc;
        //Study Create
        Study__c study= new Study__c(Client__c=acc.id,Name='Testing',NumberofExaminerCertificationRounds__c=2,PONumber__c='123456',Study_Certificate_Duration__c='Duration of Study');
        insert study;
        //Site Create
        Site__c site= new Site__c(Name='Testing Site',Zip_Postal_Code__c='301001',City__c='Delhi');
        insert site;
        //Visit Create
        Visit__c Visit= new Visit__c(Study__c=study.id,Round__c=2,VisitType__c='Visit',VisitStatus__c='Contacted',SiteC__c=site.id,Study_Specific_Site_Number__c='123456');
        insert Visit;
        //Room Create
        Room__c Room= new Room__c(Room_Name__c='Test',SiteC__c=site.Id);
        insert Room;
        //Room Certification Create
        Room_Certification__c Rc= new Room_Certification__c(Room__c=Room.Id,Status__c='certified',Room_Certification_Round__c=2,Certification_Date__c=Date.Today(),VisitSite__c=site.id,Visit__c=Visit.Id);
        Insert Rc;
        study.Study_Certificate_Duration__c='6m';
        update study;
    }
    public static testmethod void main1()
    {
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User'];
        User u = new User(Alias = 'standt', Email='standarduser@testorg.com',
        EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',LocaleSidKey='en_US',ProfileId=p.Id,
        TimeZoneSidKey='America/Los_Angeles', UserName='Testingapexclass@gmail.com');
        system.RunAs(u)
        {
            //Client Create
            Account acc= new Account(Name='Test');
            insert acc;
            //Study Create
            Study__c study= new Study__c(Client__c=acc.id,Name='Testing',NumberofExaminerCertificationRounds__c=2,PONumber__c='123456',Study_Certificate_Duration__c='Duration of Study');
            insert study;
            //Site Create
            Site__c site= new Site__c(Name='Testing Site',Zip_Postal_Code__c='301001',City__c='Delhi');
            insert site;
            //Visit Create
            Visit__c Visit= new Visit__c(Study__c=study.id,Round__c=2,VisitType__c='Visit',VisitStatus__c='Contacted',SiteC__c=site.id,Study_Specific_Site_Number__c='123456');
            insert Visit;
            //Room Create
            Room__c Room= new Room__c(Room_Name__c='Test',SiteC__c=site.Id);
            insert Room;
            //Room Certification Create
            Room_Certification__c Rc= new Room_Certification__c(Room__c=Room.Id,Status__c='certified',Room_Certification_Round__c=2,Certification_Date__c=Date.Today(),VisitSite__c=site.id,Visit__c=Visit.Id);
            Insert Rc;
        }
    }
}
Hi All,

Why a custom is not deleted that was in relationship?

Regards,
Arpit
Hi All,
Can we use one object in two applications?

Arpit Jain
Hello Everyone,

I reset one my user password but I didn't get any email via password. So pleae tell me how I can get the password?
I sthere anything else which I need to do for getting password??

Thank you.