• Tej Pal
  • 60 Points
  • Member since 2017
  • Tech Lead
  • Salesforce

  • Chatter
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
  • 25
Now I want to attract different users to get signup & use the service. How can i do? without giving access to every profile or user everytime? Kindly help me in this.

So, I'm having a problem with the first step in this Superbadge.

"Challenge Not yet complete... here's what's wrong: 
Didn't find a user named Paloma Espinoza. This user must be assigned to the Salesforce Platform user license and the Standard Platform User profile."

It shows to me but I already created de user, and give all the right permissions.

What can I do?
error page
I wanted to take my Spring 17 Release Exam . But it is not available on the Webaccessor anymore. Even on the website it says the deadline is November 17. What should I do now?
Hello community !

I have an email which send abandoned cart of clients.
Besides that I'd like to put recomendations using ampscript on some other products to my client according to where they live.
However I don't want to push in the recomendations a same product that was in the abandoned cart.
In ampscript I am able to skip the line (doesn't display anything) but instead of skipping the line I'd like to jump to the next line where the product name is different so I still have the same number of recomendations.

As anyone experience that before and could help me with ampscript please ?


I am trying to this in trailhead.

Here said that mail will arrive after "my domain" setting.
But Even if I wait one day, even if I run it in another hands-on organization, it did not reach.
(Of course it was not included in spam mail folder, too)

Is there anything idea?
Thank you.
Hi All, 
I am not able to create JWT Apex classes. Kindly help me for the same.
Hi All,

Trying to solve the trailhead of "Apex REST Callouts". Copied the code of "Test a Callout with StaticResourceCalloutMock"

Apex Class Code follows:-

public class AnimalsCallouts {

    public static HttpResponse makeGetCallout() {
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        HttpResponse response = http.send(request);
        // If the request is successful, parse the JSON response.
        if (response.getStatusCode() == 200) {
            // Deserializes the JSON string into collections of primitive data types.
            Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
            // Cast the values in the 'animals' key as a list
            List<Object> animals = (List<Object>) results.get('animals');
            System.debug('Received the following animals:');
            for (Object animal: animals) {
        return response;

    public static HttpResponse makePostCallout() {
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setHeader('Content-Type', 'application/json;charset=UTF-8');
        request.setBody('{"name":"mighty moose"}');
        HttpResponse response = http.send(request);
        // Parse the JSON response
        if (response.getStatusCode() != 201) {
            System.debug('The status code returned was not expected: ' +
                response.getStatusCode() + ' ' + response.getStatus());
        } else {
        return response;


Static resource follows:-
{"animals": ["pesky porcupine", "hungry hippo", "squeaky squirrel"]}

Test Class follows:-

private class AnimalsCalloutsTest {

    @isTest static  void testGetCallout() {
        // Create the mock response based on a static resource
        StaticResourceCalloutMock mock = new StaticResourceCalloutMock();
        mock.setHeader('Content-Type', 'application/json;charset=UTF-8');
        // Associate the callout with a mock response
        Test.setMock(HttpCalloutMock.class, mock);
        // Call method to test
        HttpResponse result = AnimalsCallouts.makeGetCallout();
        // Verify mock response is not null
            'The callout returned a null response.');
        // Verify status code
          'The status code is not 200.');
        // Verify content type   
          'The content type value is not expected.');  
        // Verify the array contains 3 items     
        Map<String, Object> results = (Map<String, Object>) 
        List<Object> animals = (List<Object>) results.get('animals');
        System.assertEquals(3, animals.size(),
          'The array should only contain 3 items.');          


But while saving the code for test class it's throwing a compilation error, stating:-
"Method does not exist or incorrect signature: void setMock(System.Type, System.StaticResourceCalloutMock) from the type test"

Request you to guide me with this. Thanks in advance!
 ReadResult result = metadataConnection.readMetadata('CustomField', new String[]{'Account.TYPE'});
    for( Metadata data : result.getRecords() )
        CustomObjectTranslation objectTranslation = (CustomObjectTranslation)data;
        for( CustomFieldTranslation fieldTranslation : objectTranslation.getFields() )
            if( fieldTranslation.getPicklistValues().length > 0 )
                System.out.println( 'Field: ' + fieldTranslation.getName() );
                for( PicklistValueTranslation value : fieldTranslation.getPicklistValues() )
                    System.out.println( '   '+ value.getMasterLabel() + ' -> ' + value.getTranslation() );

I got below error:
Unexpected token 'result'.
Hi everyone new here as the community has prompted me to ask this forum this question.

I have a custom object that the data is filled from an API connection.  So when that new custom record is created I'd like to check to see if the email address on that record matches to any lead, contact or account that we may already have in Salesforce.

If YES to a match it would be great to populate the URL of that record ID to the custom object record.  

Does anyone have sample apex code or advice or able to assist me please?

Cannot save the Controller, please help.

<td><a href=" http://sites/operations/id=" target="_blank" style="font-size:15px">Link</a></td>Lightning 
Can anyone help me how to replace "http://sites/operations/id=" the url with Custom settings in  lightning.
Now I want to attract different users to get signup & use the service. How can i do? without giving access to every profile or user everytime? Kindly help me in this.
Create an insert/update trigger on Opportunity such that if the opportunity is Primary, then make all other opportunities for that account as non-primary.

I am new to sfdc. i want the implementation of trigger logic in apex class. i have tried by writing logic which is shown below. iam getting error of creating apex class. can anyone help me.
Apex class:
public class Oppurtunity{
    public static void display()
 List<Id> accID = new List<Id>();
    for(Oppurtunity opp : trigger.new)
        if(opp.accountId != null){

    List<account> acc = [select id, (select id, IsPrimary__c FROM Opportunity where IsPrimary__c = true) from Account WHERE Id In: accID];
 Map<id, boolean> bool = new map<id,boolean>();
    for(account a : acc){
        bool.put(a.id, a.Oppurtunities.size()>0 ? true : false);

    for(Oppurtunity opp : trigger.new)
        if(bool.get(opp.AccountId) == true)
            c.addError('no more primary Oppurtunities');


trigger checkaccount1 on Opportunity(before insert, before update)

How to insert the data to salesforce using java?

Thanks in advance
Hello All, 

Can anyone tell me, how to use the Column Function in apex class ?

I have no idea how that works. 

Thank you all in advance.

My production org is on Managed Package Version 1.3.
There  is a bug on the released version which needs an immdeiate fix.
Another developer who created the Managed package has made changes to the code on the Developer org.(Created few beta packages 1.4)
The developer now left the organisation and I am given access to the org and I can view the code.

I have to fix the issue on 1.3 version and as the code has many changes,is it possible to fix on older version.
If yes, please help me how as I am completely new to this area.

I am looking to expand our development offerings and looking for nearshore development teams or UK development teams to bring on board. If anyone is either from a dev team or can recommend such dev teams it would be realyl useful, i will then respond with some qualification questions.