• Jitender Padda
  • NEWBIE
  • 119 Points
  • Member since 2014

  • Chatter
    Feed
  • 2
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 20
    Replies
Hi all,

I have this kind of problem:
when I run tests, they stuck with status "Queued".
I've been waiting for 40-50 min.
User-added image

Thanks.
When I first tried this challenge I was not successful and was having a difficult time trying to figure out what I was doing wrong. The error I received when checking the challenge was:
 
Challenge not yet complete... here's what's wrong: 
The 'Google Link' custom button was not found

I was thrown off becuase one of the criteria for the challenge is:
  • The custom button must be named 'Google Link'.
But "Google Link" is not a valid name. I believe this shiould instead state that the *label* should be "Google Link". Ultimately I passed the challenge once I realized that I had created a link instead of a button.
Hi Salesforce Support and Forum Members,

I opened this link (https://developer.salesforce.com/docs/atlas.en-us.198.0.pages.meta/pages/pages_variables_global_action_valid_values.htm) and found that there are lots of interesting features which we can implement using the $Action global variable in VF pages but unfortunately there is no documentation on its usage and how we can leverage them in Visualforce.Since the actions specified in the above link seem quite useful , I would like to get some examples on how to use them or if there is any detailed documentation (with examples).

PLEASE BE ADVISED THAT I AM NOT LOOKING FOR SIMPLE ACTIONS SUCH AS EDIT or NEW BUT COMPLEX ONES SUCH AS GOOGLEMAPS,YAHOOWEATHER.

If you have implemented any of those then I would really appreciate your guidance.

Thanks,
Jitender
Hi Trailhead Support,

I would like to point out an error which I recieved during compiling the  AnimalsCalloutsTest Class in the Apex Rest Callouts. The error was due to the following line and it was because the class Test is now part of the System class and it should have been System.Test.setMock(HttpCalloutMock.class, mock); instead of Test.setMock(HttpCalloutMock.class, mock);

User-added image

The API version of my class is 35.0 so I believe it requires the above correction. Please fix this if it is an error or you can correct me if I am wrong.

Thanks,
Jitender
Hi guys,

I tried creating a new dev org and am getting this page below and cannot create an account. Is anyone else facing the same issue?
User-added image
User-added image
Hi All,

I am writing some complex code for an existing application and that code will be merged into a managed package. Due to the complexity of the project , I have to Query and use DMLs inside a loop. I tried a lot to avoid it but it seems to be the only way. I just want to know if it will pass the security review? It is being used by a Batch Class and the Batch size is fixed from code so error will never come up, but will salesforce allow this ?? Please give me your suggestions.
Hi all,

I am seeing the error - Maximum stack depth has been reached.  I read in the Limits that I can chain unlimited Queuable jobs(Calling one Queueable Job from another Queueable Job) from any edition except Developer Edition. I am currently working in an Enterprise edition and am still seeing this error. Can someone kindly explain to me the limits of Queueable Apex? 
I am seeing this error while clicking on button with Onclick Javascript written in it. Could somebody please help me out a bit? I have posted a screenshot below.
screenshot.User-added image
I added the Custom Button to the 'Contact Layout' but still it says - Challenge not yet complete... here's what's wrong: 
The 'Google Link' custom button was not found. 
I am confused as to why this is happening. I am attaching screenshots and would appreciate any suggestions, thank you.
User-added image
User-added image
User-added image
Hi Salesforce Support and Forum Members,

I opened this link (https://developer.salesforce.com/docs/atlas.en-us.198.0.pages.meta/pages/pages_variables_global_action_valid_values.htm) and found that there are lots of interesting features which we can implement using the $Action global variable in VF pages but unfortunately there is no documentation on its usage and how we can leverage them in Visualforce.Since the actions specified in the above link seem quite useful , I would like to get some examples on how to use them or if there is any detailed documentation (with examples).

PLEASE BE ADVISED THAT I AM NOT LOOKING FOR SIMPLE ACTIONS SUCH AS EDIT or NEW BUT COMPLEX ONES SUCH AS GOOGLEMAPS,YAHOOWEATHER.

If you have implemented any of those then I would really appreciate your guidance.

Thanks,
Jitender
I added the Custom Button to the 'Contact Layout' but still it says - Challenge not yet complete... here's what's wrong: 
The 'Google Link' custom button was not found. 
I am confused as to why this is happening. I am attaching screenshots and would appreciate any suggestions, thank you.
User-added image
User-added image
User-added image
Hi Salesforce Support and Forum Members,

I opened this link (https://developer.salesforce.com/docs/atlas.en-us.198.0.pages.meta/pages/pages_variables_global_action_valid_values.htm) and found that there are lots of interesting features which we can implement using the $Action global variable in VF pages but unfortunately there is no documentation on its usage and how we can leverage them in Visualforce.Since the actions specified in the above link seem quite useful , I would like to get some examples on how to use them or if there is any detailed documentation (with examples).

PLEASE BE ADVISED THAT I AM NOT LOOKING FOR SIMPLE ACTIONS SUCH AS EDIT or NEW BUT COMPLEX ONES SUCH AS GOOGLEMAPS,YAHOOWEATHER.

If you have implemented any of those then I would really appreciate your guidance.

Thanks,
Jitender

Wondering if anyone has experienced this issue and has a solution or workaround to get responsive email templates working with Salesforce email templates.

I use an application to build responsive emails, which provides all the html with inline css . When I send a test with with the application or a third party service, it gets delivered with no layout anomalies.
However, when I past the code into a "Custom" Salesforce email template, save it, and send a test, the layout is all distorted on mobile devices. I am guessing Salesforce is ignoring or removing some of the inline CSS. 

Any suggestions to this issue?

Hi all,

I am seeing the error - Maximum stack depth has been reached.  I read in the Limits that I can chain unlimited Queuable jobs(Calling one Queueable Job from another Queueable Job) from any edition except Developer Edition. I am currently working in an Enterprise edition and am still seeing this error. Can someone kindly explain to me the limits of Queueable Apex? 
Can you help me how to test this controller :( plsss i need your help.

public with sharing class GHI_Portal_Login {
    
    public Boolean hasInputUsername { get; set; }
    public Boolean hasInputPassword { get; set; }
    private List<User> userLogin;
    public String username { get; set; }
    public String password { get; set; }
    public String loginMessage { get; set; }
    
    public GHI_Portal_Login(){
        this.hasInputUsername = true;
        this.hasInputPassword = true;
        
        String aMsg = ApexPages.currentPage().getParameters().get('A');
        aMsg = (aMsg != null && aMsg != '') ? aMsg : '';
        this.loginMessage = '';
        
        if (aMsg == '1') {
            this.loginMessage = 'Please log in.';
        } else if (aMsg == '2') {
            this.loginMessage = 'Your session has expired. Please log in.';
        }
    }
    
    public PageReference login() {
            // where startUrl is the landing page after logging in
            String startUrl = '/apex/GHI_Portal_Home';
            
            if (username.length() == 0) {
                this.hasInputUsername = false;
            } else {
                this.hasInputUsername = true;
            }
            
            if (password.length() == 0) {
                this.hasInputPassword = false;
            } else {
                this.hasInputPassword = true;
            }
            
            userLogin = new List<User>([SELECT Username, GHI_Portal_Number_of_Attempts__c FROM User WHERE Username = :username LIMIT 1]);
            PageReference prSiteLogin = Site.login(username, password, startUrl);
            
            if (userLogin.size() == 0) {
                this.loginMessage = 'Username is not valid';
            } else {
                if(userLogin[0].GHI_Portal_Number_of_Attempts__c < 4 || userLogin[0].GHI_Portal_Number_of_Attempts__c == null){
                    if (prSiteLogin == null && this.hasInputPassword) {
                        updateUserLoginAttempt();
                        Integer numberOfAttempts = 5 - Integer.valueOf(userLogin[0].GHI_Portal_Number_of_Attempts__c);
                        this.loginMessage = 'Login attempt unsuccessful. You have '+numberOfAttempts+' remaining.' ;
                    } 
                    else {
                        this.loginMessage = '';
                    }
                }
                else{
                    this.loginMessage = 'Account locked. To reset password select the Forgot Password link below. For additional assistance, contact Customer Service.';
                }
            }
            
            if(hasInputUsername && hasInputPassword){
                List <LoginHistory> loginHistory= [SELECT LoginTime,Status,UserId FROM LoginHistory where UserId=:userLogin[0].Id order by LoginTime DESC limit 1];
                    
                    if(loginHistory.size() > 0){
                        if(loginHistory[0].Status=='Success'){
                            userLogin[0].GHI_Portal_Number_of_Attempts__c = 0;
                            update userLogin;
                        }
                    }
                return prSiteLogin;
            }
            else{
                return ApexPages.currentPage();
            }
        }
        
        public void updateUserLoginAttempt() {
            
            if(userLogin.size()>0){
                if(userLogin[0].GHI_Portal_Number_of_Attempts__c!=null){
                    userLogin[0].GHI_Portal_Number_of_Attempts__c +=1;
                }
                else{
                    userLogin[0].GHI_Portal_Number_of_Attempts__c = 0;
                    userLogin[0].GHI_Portal_Number_of_Attempts__c +=1;
                }
                update userLogin;
            }
        }
        
        /* PAGE REDIRECTIONS */
    
    public PageReference goToHome() {
        PageReference pr = Page.GHI_Portal_Home;
        pr.setRedirect(true);
        
        return pr;
    }
    public PageReference goToPasswordResetStep1() {
        PageReference pr = Page.GHI_Portal_PasswordReset_Step1;
        pr.setRedirect(true);
        
        return pr;
    }
    
        public PageReference goToUserNameResetStep1() {
        PageReference pr = Page.GHI_Portal_ForgottenUserName_Step1 ;
        pr.setRedirect(true);
        
        return pr;
    }
}


 
hello dear community, I was going to delete apex classes by installing the force.com ide in eclipse for this purpose but since I installed force.com it's not visible in window->show view->other.. 
might this have something to do with the JDK I'm using? I use kempler and so far everythings updated. 
any suggestions? thanks in advance!
hi all,
i have completed tshirt challenge all 5 modules.Now whats next??
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).Name the validation rule 'Contact must be in Account ZIP Code'.
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.
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)

for the above challenge I used following validation rule and its working

IF( AND(NOT( ISBLANK(  MailingPostalCode__c)), NOT(ISBLANK( AccountId )) ),  IF( (NOT(MailingPostalCode__c = Account.ShippingPostalCode__c)), true, false) , false)

But when I click on check challenge giving Error anybody can can help me on this.
   Error Message              "Challenge not yet complete... here's what's wrong: The validation rule failed to enforce the business logic"

Thanks
Shaijan
I am seeing this error while clicking on button with Onclick Javascript written in it. Could somebody please help me out a bit? I have posted a screenshot below.
screenshot.User-added image
Hi all,

I have this kind of problem:
when I run tests, they stuck with status "Queued".
I've been waiting for 40-50 min.
User-added image

Thanks.
I am trying to execute a SOQL query via the saleforce enterprise API, from a Visual Studio applciation.

My query works on a full sandbox of my Org, but not on the Org itself, it give the error: INVALID_TYPE: sObject type 'My_Custom_Object__c' is not supported.

I am running the query under the system administrator credentials.
I have checked that these credentials have access to all the relevant objects. (In fact it has access to every single object.)
The objects are under a managed package, but there are no restrictions in place on the objects. (I have tried enabling restrictions and granting access to the necessary objects, but this has no effect.)

The custom objects are visible in the Visual Studio 'Object Browser', but if I return a DescribeGlobalResult object and echo out all the object names, the ones from within my managed packages are not visible.

Does any one have any idea why this does not work?  And how can it be that it works in the full sandbox?

Thanks.
I added the Custom Button to the 'Contact Layout' but still it says - Challenge not yet complete... here's what's wrong: 
The 'Google Link' custom button was not found. 
I am confused as to why this is happening. I am attaching screenshots and would appreciate any suggestions, thank you.
User-added image
User-added image
User-added image
How to populate merge variable (e.g.{!Case.SuppliedName}) in Template when I have a template after querying from EmailTemplate . Actually want to send this Email Template with populated values  in a String to send http request while Integrating Sendgrid Email web Service in Salesforce.Please Suggest me .

Thanks.
Anyone Seen this on the validation rule trailhead? - 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, Contact Must Be in Account Zip Code: []
When I first tried this challenge I was not successful and was having a difficult time trying to figure out what I was doing wrong. The error I received when checking the challenge was:
 
Challenge not yet complete... here's what's wrong: 
The 'Google Link' custom button was not found

I was thrown off becuase one of the criteria for the challenge is:
  • The custom button must be named 'Google Link'.
But "Google Link" is not a valid name. I believe this shiould instead state that the *label* should be "Google Link". Ultimately I passed the challenge once I realized that I had created a link instead of a button.

After two years of writing Apex I thought I finally found a use for sosl, but it seams that it's not possible to search using a variable as I have become used to in SOQL. Can anybody tell me if the following is possible, or do I have to put the sosl query inside of a for loop so that I can get the string which makes up the keySet().

 

 

List<List<sObject>> leadsYContacts = [FIND :newLeadsMap.keySet() IN Email Fields Returning Lead,Contact];

 

The variable newLeadsMap is a Map<String,Lead>. The string being the Lead's email. I am trying to make a trigger that finds existing contacts and leads that have the same email as incoming leads.