• Tien Le 488
  • NEWBIE
  • 40 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 5
    Likes Given
  • 7
    Questions
  • 23
    Replies
Hello,

I'm looking to build my automated tests from Amazon Workspace and connecting to my company's salesforce communities site but I'm not able to log in with Amazon Workspace.  I'm finding status "Restricted IP" from the Login History.  Found that I can add network access but still can't login and still seeing Restricted IP.  

Anyone having success with a similar scenario or situation like mine?

Thanks in advance for your help!
Tien
Hi,

I'm trying to make progress with Create a Namespace per the module "Package an Exchange App" of trailhead "AppExchange App Development" which should help me succeed with the Challenge exericise later;
User-added image

however, I'm not able to get to the Change Developer Settings section of the supposed Packages page that I'm not able to get to because Step 1 resulted in no "Packages" option for me to click. 

I see only "Installed Packages", "Package Manager", and "Package Usage".  Tried clicking closest option "Installed Packages" and doesn't look like it's the right option.  

Any help is appreciated.

Thanks, 
Tien.

PS Even tried with new Dev Org and same issue:
User-added image
Hi,

I'm working on the ExternalSearch_Tests Apex class and trying to get my negative scenario to pass, but it won't.  I know my logic isn't correct so may I get some help? (Technical pointers and not necessarily the answer.  I'll figure it out.  I'm not sure what I'm doing being still a beginner with Apex.  Thanks)

@isTest static void test_method_negative() {
    HttpMockFactory mock = new HttpMockFactory(500, 'Internal Server Error', 'Did not recieve a 200 status code: ', new Map<String,String>());
    Test.setMock(HttpCalloutMock.class, mock);
    String result;
    Test.startTest();
      result = ExternalSearch.googleIt('!');
    Test.stopTest();
    system.assertEquals('Did not recieve a 200 status code: ', result); 
  }

Reference trailhead "Unit Testing on the Lightning Platform (https://trailhead.salesforce.com/en/content/learn/modules/unit-testing-on-the-lightning-platform" style="color:#0563c1; text-decoration:underline)" - module "Use Mocks and Stub Objects".
Hi,

I'm trying to make progress with my trailhead "Database & .NET Basics - Write SOSL Queries" but stuck on Prerequisites #3: On the Documents tab, click New under Recent Documents.

I don't see the Documents tab as the author has referred to.  Where is it?  How do I get there?

Thanks in advance for your help,
Tien
User-added image
Hi,

I'm trying to complete the trailhead "" and encountering a challenge.  If anyone has any feedback for me on this, I'd appreciate very much.  

Added VerifyDate.apxc as I did with TemperatureConverter.apxc.  Added TestVerifyDate.apxc (even with VerifyDateTest.apxc) as I did with TemperatureConverterTest.apxc.  I verified that those classes exist per screenshot1 below:
User-added image

I'm supposed to be able to go to Test, select New Run, then with Select Tests pop-up, I'm supposed to see the TestVerifyDate (and/or VerifyDateTest) classes to select and run; however, I'm not seeing those test classes.  Why?  Even with "[All Namespaces]", they still don't show.  

Workaround for now is to run the test suite per instructions earlier in the trailhead.  

Reference screenshot2 below:
User-added image

Thanks in advance for your help.
Tien





 
Hi,

I'm working thru the trailhead "Salesforce User Tour" - "Check Out Reports Dashboards Feeds and More".  Create a List View section instructs me to ...
  1. From List View Controls, select New. A dialog box appears.
  2. Enter a name for your list.
  3. Choose who can see this list view: just you, or all users, including Partner and Customer Portal users.
  4. Click Save. The Filters panel appears...
I'm not sure what is this List View Controls, what page I'm supposed to be on and even if I tried anything and select New, I'm not following "Enter a name for your list".  There's no such thing.

Any suggestion is appreciated.  Thanks,
Tienlist view controls click New??
Hi,

I'm at Step 2 of Review Your Deployment section of module "Deploy to Production with CI/CD" of "Build an Automated CI/CD Pipeline with GitLab" trailhead and NOT seeing "Property Finder" tab in my Trailhead Playground like I should.  Saw it earlier with Scratch org per previous step(s).  This most likely resulted in "We could not find the unlocked package 'DreamHouse' installed upon clicking "Verify step to earn 100 points".

I would like to resolve this issue.  Anyone with suggestion(s)?

Thanks in advance for your help,
Tien 
Review Your Deployment failed
Hi,

I'm trying to complete the trailhead "" and encountering a challenge.  If anyone has any feedback for me on this, I'd appreciate very much.  

Added VerifyDate.apxc as I did with TemperatureConverter.apxc.  Added TestVerifyDate.apxc (even with VerifyDateTest.apxc) as I did with TemperatureConverterTest.apxc.  I verified that those classes exist per screenshot1 below:
User-added image

I'm supposed to be able to go to Test, select New Run, then with Select Tests pop-up, I'm supposed to see the TestVerifyDate (and/or VerifyDateTest) classes to select and run; however, I'm not seeing those test classes.  Why?  Even with "[All Namespaces]", they still don't show.  

Workaround for now is to run the test suite per instructions earlier in the trailhead.  

Reference screenshot2 below:
User-added image

Thanks in advance for your help.
Tien





 
Hello,

I'm looking to build my automated tests from Amazon Workspace and connecting to my company's salesforce communities site but I'm not able to log in with Amazon Workspace.  I'm finding status "Restricted IP" from the Login History.  Found that I can add network access but still can't login and still seeing Restricted IP.  

Anyone having success with a similar scenario or situation like mine?

Thanks in advance for your help!
Tien
Hi,

I'm trying to make progress with Create a Namespace per the module "Package an Exchange App" of trailhead "AppExchange App Development" which should help me succeed with the Challenge exericise later;
User-added image

however, I'm not able to get to the Change Developer Settings section of the supposed Packages page that I'm not able to get to because Step 1 resulted in no "Packages" option for me to click. 

I see only "Installed Packages", "Package Manager", and "Package Usage".  Tried clicking closest option "Installed Packages" and doesn't look like it's the right option.  

Any help is appreciated.

Thanks, 
Tien.

PS Even tried with new Dev Org and same issue:
User-added image
Hi,

I'm working on the ExternalSearch_Tests Apex class and trying to get my negative scenario to pass, but it won't.  I know my logic isn't correct so may I get some help? (Technical pointers and not necessarily the answer.  I'll figure it out.  I'm not sure what I'm doing being still a beginner with Apex.  Thanks)

@isTest static void test_method_negative() {
    HttpMockFactory mock = new HttpMockFactory(500, 'Internal Server Error', 'Did not recieve a 200 status code: ', new Map<String,String>());
    Test.setMock(HttpCalloutMock.class, mock);
    String result;
    Test.startTest();
      result = ExternalSearch.googleIt('!');
    Test.stopTest();
    system.assertEquals('Did not recieve a 200 status code: ', result); 
  }

Reference trailhead "Unit Testing on the Lightning Platform (https://trailhead.salesforce.com/en/content/learn/modules/unit-testing-on-the-lightning-platform" style="color:#0563c1; text-decoration:underline)" - module "Use Mocks and Stub Objects".
Hi,

I'm trying to complete the trailhead "" and encountering a challenge.  If anyone has any feedback for me on this, I'd appreciate very much.  

Added VerifyDate.apxc as I did with TemperatureConverter.apxc.  Added TestVerifyDate.apxc (even with VerifyDateTest.apxc) as I did with TemperatureConverterTest.apxc.  I verified that those classes exist per screenshot1 below:
User-added image

I'm supposed to be able to go to Test, select New Run, then with Select Tests pop-up, I'm supposed to see the TestVerifyDate (and/or VerifyDateTest) classes to select and run; however, I'm not seeing those test classes.  Why?  Even with "[All Namespaces]", they still don't show.  

Workaround for now is to run the test suite per instructions earlier in the trailhead.  

Reference screenshot2 below:
User-added image

Thanks in advance for your help.
Tien





 
Hi, I am new to Salesforce, so thanks for any help

I am trying to connect my application to the Salesforce REST API. I have a Ruby app so I am using Restforce (https://github.com/restforce/restforce). I'm attempting to use the Username/Password authentication which I believe is the same as the Session ID Authorization described here https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm

I created a new Connected Appin the Salesforce Setup App Manager. I clicked enable OAuth settings and selected Full Access as the Oauth scope. 

But when attempting the authentication I am receiving an error:

{"error":"invalid_client_id","error_description":"client identifier invalid"}

I’m using my personal salesforce account’s username, password and security token. I am using the Connected App's Consumer Key as the Client ID and Consumer Secret as the Client Secret

This happens both when using Restforce or when manually calling curl https://login.salesforce.com/services/oauth2/token -d "grant_type=password" ...

I'm pretty sure I'm copying/pasting the correct value of Consumer Key into Client ID.

Did I miss a step when setting up my Connected App? Could the error message mean something else?

Thank you for any help or suggestions!
I am stuck at step 5 of automation superbadge:  new Opportunity with a 'Prospecting' stage for a 'Prospect' Account did not successfully create a Task for the Account owner with the Subject 'Send Marketing Materials'. I am checking for nullvalues in trigger and set up correct fields I guess. Hard to figure out what the problem is as the screen error is very generic. BTW I am 1 week new to SF, but manage to clear hurdles till now. I am spinning my wheels for 2 days now with this problem. Any help much appreciated !
Trigger conditions
Task fields
best practices for test classes
Hi,

I'm currently working on the Process Automation Specialist Superbadge and I'm struggling with Challenge #5.

Specifically, I'm currently getting the following error:
 
Challenge Not yet complete... here's what's wrong: 
An Opportunity with the Stage 'Negotiation/Review' and the Amount greater than $100,000 was not successfully submitted for approval upon creation.

I've created an approval process:
Screenshot of approval process

And I've included "Submit for Approval" as an action for the 3rd node of my process:
Opportunity Negotiation Node


Submit for Approval Settings

Any ideas what I'm doing wrong and how to fix it?

Thanks,
-Brian.
Hi All,

I am not able to complete Apex Specialist Super Badge Chlallenge, getting this error "Challenge Not yet complete... here's what's wrong:  The Case object has not been renamed to 'Maintenance Request'." but I have already renamed the tab names because we cannot change the API name we can only change the lables.

Please help me in this.

Thanks in Advance,
Javeed Shaik

error
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;
}
}

I need test class for this class.Please provide me
Hello dear community, I was wondering how exactly to delete an apex class because obviously you can't do that in the production area, I already tried deleting it from my sandbox which worked but it didnt have any impact on my actual production area.
Thanks in advance
Please help! I am having trouble with the appex trigger challenge 1/2.  I think I know how to do the logic, I am just forgetting how to create a checkbox on here.  Thanks!
Hi,

I'm not able to complete #2 Automate Accounts. It give me the following error.
"Challenge Not yet complete... here's what's wrong:
Please check the configuration of the custom fields on the Account object. The formulas, rollup summaries, etc. did not produce the expected outcome."


Can anyone tell me what went wrong? Thanks.

My Custom Fields configuration are as following:
  • Number of deals (Roll-Up Summary field): Count Opportunity. No filter criteria
  • Number of won deals (Roll-Up Summary field): Count Opportunity with filter criteria as "Stage equals Closed Won"
  • Last won deal date (Roll-Up Summary field): MAX(Opportunity: Close Date) with filter criteria as "Stage equals Closed Won"
  • Deal win % (Formula field): Number_of_won_deals__c / Number_of_deals__c
  • Total amount of won deals (Roll-Up Summary field): SUM(Opportunity: Amount) with filter criteria as "Stage equals Closed Won"
  • Call for Service (Formula field): IF( DATE( YEAR(Last_won_deal_date__c)+2 , MONTH(Last_won_deal_date__c) , DAY(Last_won_deal_date__c) ) <= TODAY(), 'YES', 'NO')

Hi All,

Anyone ever used "Provar" for their Salesforce Project, please let me know about the following things:-

1. How to use it ?(Is it a separate tool need to be installed like Eclipse)
2. How easy to get hands on of Provar ?

How ever after browsing over internet I found a video of it and some pros of it :-

https://www.youtube.com/watch?v=mljj8WA2Fe4

1.It’s code-free. As I said above, investing in a lot of code to automate your testing does not make sense for a platform like Salesforce that provides so much declarative power. Your tool should have a point-and-click interface and be admin-friendly.

2.It’s flexible. Your tool should be able to tests across different environments and browsers without requiring changes to the test case. Low-quality tools commonly hardcode things that change in different environments, like Field IDs, making your tests brittle and maintenance-heavy. Avoid this.

3.It’s smart. Your tool should be able to handle minor cosmetic changes without tests breaking (e.g. moving fields on a page layout or Visualforce page). Human testers wouldn’t get confused by this, and your automation shouldn’t either.

4.It knows Salesforce. Your tool should be able to test advanced elements like Visualforce pages and the Service Cloud console. Even if you don’t use these elements yourself, it’s a good test of product maturity. Many tools struggle with embedded tables and tabs.

5.It supports integration. Your tool should be able to connect up to other systems such as databases or your email system. This will help you to do true end-to-end testing of your processes instead of looking at Salesforce in isolation.

6.It generates reports automatically. Your tool should be able to generate reports on the successes and failures of your tests. It should also have options for running tests automatically, e.g. on a nightly basis, so that you can receive a report in your emails in the morning and just scan through. (This is normally done through a continuous integration system, e.g. Bamboo.)

7.It’s Lightning ready. Even if you’re not using Lightning yet, your tool should allow you to run tests in both interfaces. This will let you make the switch later on without dependencies.

Any help is really appreciated.

 

Hello, for the Salesforce Trailhead "Using Future Methods" I keep getting the error "The 'AccountProcessorTest' test class doesn't appear to be calling the 'AccountProcessor.countContacts' method between Test.startTest() and Test.stopTest()." I believe I have the right syntax, so I'm not sure what is wrong. My main class is fine. the problem only seems to be in the AccountProcessorTest.apxc

AccountProcessorTest.apxc
@isTest private class AccountProcessorTest {
    @isTest static void countContacts() {
        Test.setMock(AccountProcessorTest.class, new Account());
        Test.startTest();
        	AccountProcessor.countContacts();			
        Test.stopTest();
        
    } 	
}


Here is my main class in case anyone needs it:

AccountProcessor.apxc
global class AccountProcessor {
	@future
    public static void countContacts(Set<id> setId){
        List<Account> lstAccount = [SELECT Id, Number_of_Contacts__c, (SELECT Id FROM Contacts) FROM Account where id in : setid];
        for(Account acc: lstAccount){
            List<Contact> lstCont=acc.contacts;
            	acc.Number_of_Contacts__c = lstCont.size();
        }
        update lstAccount;
    }
}

Thank you in advance!
Justin Duross

 

The organization-wide default for the Project custom object was not configured correctly. I am stuck here anyone can you please help me..please share scrren shot for better understanding
 
  • April 05, 2016
  • Like
  • 1
hello,

i am a newbie to salesforce and trying to complete this trailhead challenge and unable to find a way through apex to generate this method for creating new contacts with unique id. as one requirement to pass the challenge is "The 'generateRandomContacts' method must be capable of consistently generating contacts with unique first names."

If somebody successfully completed the task kindly help me.

regards,