• lordLoxor
  • NEWBIE
  • 90 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi,
I'm attempting the following module, where you need to install an unmanaged package.
https://trailhead.salesforce.com/modules/lightning_app_builder/units/lightning_app_builder_custom_comps 
I have followed the following help article's steps exactly
https://force.desk.com/customer/portal/articles/2710899-installing-a-package-or-app-to-complete-a-trailhead-challenge?b_id=13478

However, the unmanaged package is still being installed to my overall Salesforce instance, NOT to my "Trailhead Playground".

Given the challenge checks against the Playground, it is impossible currently to complete the challenge.
Is this a common problem & if so how do I solve it?
Thanks,
Matt



 
hello there. with the help of Nayana K and the developer community here. i wrote a class to send 2 diffrent sets of emails based on when they are recieved. one set is between the hours of 6pm to 8.59am EST and the other email is sent at 9am to 5.59pm EST. it is 100% working but i have been having trouble using the setCreateDate inside the test class it doesnt seem to be firing within the times i set. 

heres the if statement that does not fire. 
 
if(objLead.CreatedDate.hour() >= 18 || objLead.CreatedDate.hour() <= 8)

no code below this gets covered but everything in the else gets covered. 

here are my tests
 
@isTest 
private class jungoLeadFollowupTest 
{

	@isTest static void zillowNull() 
	{
		Time myTime = Time.newInstance(12, 0, 0, 0);
		Date myDate = Date.newInstance(2016, 10, 5);
		DateTime dt = DateTime.newInstance(myDate, myTime);		
		JungoLeadsFrc__JungoLeads__c newLead = new JungoLeadsFrc__JungoLeads__c(
		JungoLeadsFrc__Zillow_Recipient_Email__c = null);
		insert newLead;
		Test.setCreatedDate(newLead.Id, dt);
		
	}
	
	@isTest static void zillowNotNull()
	{
		Time myTime = Time.newInstance(12, 0, 0, 0);
		Date myDate = Date.newInstance(2016, 10, 4);
		DateTime dt = DateTime.newInstance(myDate, myTime);
		JungoLeadsFrc__JungoLeads__c newLead = new JungoLeadsFrc__JungoLeads__c(
		JungoLeadsFrc__Zillow_Recipient_Email__c ='jfrangoulis@unitedmortgage.com');
		insert newLead;
		Test.setCreatedDate(newLead.Id, dt);		
		
	}
	@isTest static void afterHourEmailNotNull()
	{
		Time myTime = Time.newInstance(24, 0, 0, 0);
		Date myDate = Date.newInstance(2016, 10, 4);
		DateTime dt = DateTime.newInstance(myDate, myTime);
		JungoLeadsFrc__JungoLeads__c newLead = new JungoLeadsFrc__JungoLeads__c(
		JungoLeadsFrc__Zillow_Recipient_Email__c ='jfrangoulis@unitedmortgage.com',
		JungoLeadsFrc__EmailAddress__c = null);
		//newLead.setCreatedDate(newLead.Id, dt);
		insert newLead;
		Test.setCreatedDate(newLead.Id, dt);
	}
	
		@isTest static void emailnull()
	{
		Time myTime = Time.newInstance(24, 0, 0, 0);
		Date myDate = Date.newInstance(2016, 10, 4);
		DateTime dt = DateTime.newInstance(myDate, myTime);
		JungoLeadsFrc__JungoLeads__c newLead = new JungoLeadsFrc__JungoLeads__c(
		JungoLeadsFrc__EmailAddress__c = 'jfrangoulis@unitedmortgage.com',
		JungoLeadsFrc__Zillow_Recipient_Email__c = null);
		insert newLead;
		Test.setCreatedDate(newLead.Id, dt);
		
	}

}