• EmilienGuichard
  • NEWBIE
  • 212 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 7
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 30
    Replies

Hello,

Could anyone help me on how I get a mass edit on All Accounts which have a Status e.g. Customer.  I have serveral Workflows which need to run daily for these Customers.  However, the records need to be edited for the WF to trigger.

I'm not apex efficient and am not sure how to go about getting this done. 

 

I have seen this:  

in your developer console run the query. suppose your object is account.
List<Account> acc = [Select id from account limit 10000]; update acc

 

From this link: http://salesforce.stackexchange.com/questions/93434/trigger-a-mass-record-update-to-activate-workflow

But I am not sure where to start this?  Can anyone guide me please.

Thank you
Jin

Hello,

I have a visualforce page used for sending an email to some contacts and Salesforce users.
This email can also be sent to people that are not contacts nor users in Salesforce but contacts from my Gmail address book.

My idea would be to have the same autocomplete that exists in Gmail when typing the name of the contact but in the visualforce page using Google API.

Does asomebody has already achieved something like that ?

Many thanks for your insights.
Hello,

The environment attached to my Trailhead account is expiring in 72 days, will I be blocked when it will be expired ?
Is it possible to remove this expiration or to attach it to another dev org ?
Hello,

Does anybody know where to get a Electric Imp Developer Kit to complete the trail ?

Already emailed trailhead@electricimp.com as advised but no answer yet.
Hi,

I am making an apex rest callout and I am getting a list of objects
 
if (response.getStatusCode() == 200) {
            List<Object> results = (List<Object>) JSON.deserializeUntyped(response.getBody());
            // Cast the values in the 'equipements' key as a list
            List<Object> equipements = (List<Object>) results;
            System.debug('Received the following equipements:');
            for (Object equipement : equipements) {
                System.debug(equipement.get('cost'));

and I am getting an error "Method does not exist or incorrect signature: [Object].get(String)" when I try to access an ojbect field.

Here is an exemple of an object :
 
{_id=55d66226726b611100aaf741, cost=5000, lifespan=120, maintenanceperiod=365, name=Generator 1000 kW, quantity=5, replacement=false, sku=100003}
What is the right way to do it ?

Thanks a lot.

 
Hi,

I'm trying to validate step 5 for the Security Specialist superbadge "Set up reporting error" and I'm geeting the following error :

Challenge Not yet complete... here's what's wrong:
The Field Sales User profile does not appear to have the correct permission for create and customize reports.

I don't understand what's wrong cause I've check all reports permissions on the Field Sales User profile.

Could you please advice ?

Thanks.
Hi there,

Trying to check Reports & Dashboards Specialist step 2 and got this error :
 
Challenge Not yet complete... here's what's wrong:
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: LYWTXAJA
Could you please advise ?

Thanks a lot !
 
Hi all,

I'm stuck in the Apex Integration Services - Apex SOAP Callouts challenge with the following message "The Apex class 'ParkLocator' does not appear to be calling the SOAP endpoint.".

Could you please advise ?
Hi,

I trying to validate trailhead challenge " Quick Start: Prepare the App for Local Development " but when I type the following command
in the command line "DATABASE_URL=`heroku config:get DATABASE_URL` PGSSLMODE=require npm start"
I have an error message saying that the command isn't recognized.

Could you please advise ?
Hi,

I trying to validate trailhead challenge " Quick Start: Heroku Connect Provision the Heroku Connect Add-on " but I have the error :
"Step Not yet complete... here's what's wrong:
The Heroku Connect Add on has not been setup correctly. "

I don't understand why, cause I've checked the listen and write option and selected the 7 fields in the mapping.
Moreover the contact is correctly updated in Salesforce.

I have tested with region Europe and also United States as mentionned here : https://developer.salesforce.com/forums/?id=906F00000005IX8IAM
but still the same error message.

Could you please advise ?
hi,
i'm trying to finish the challenge "Quick Start: Reports & DashboardsCreate a Dashboard" but I'm having the following error :

"Step not yet complete... here's what's wrong:
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: LHRVQKEA"

Could you please advise ?
Thanks a lot.
Hello all,

I'm tring to complete the step "Creating a Visualforce Page"  on project "Build a Conference Management App" and when I hit the verify button I get the following error :

"There was an unhandled exception. Please reference ID: VQLWBWHN. Error: Faraday::Error::ResourceNotFound. Message: NOT_FOUND: The requested resource does not exist
Note: you may run into errors if you've skipped previous steps."

Could someone please help me ?

Thanks a ton.
Hello all,

I'm stuck with the Lightning challenge "Using Apex in Components" :

here is the component :
<aura:component controller="DisplayCaseController">
	<aura:attribute name="record" type="Case[]"/>

    <aura:iteration items="{!v.record}" var="c">
	    {!c.Subject}, {!c.Description}, {!c.Subject}, {!c.Status }
	</aura:iteration>
</aura:component>
the component controller :
({
    getRecord: function(cmp){
        var action = cmp.get("c.getCaseFromId");
        action.setCallback(this, function(response){
            var state = response.getState();
            console.log(state);
            if (state === "SUCCESS") {
                cmp.set("v.record", response.getReturnValue());
            }
        });
	 $A.enqueueAction(action);
    }
})
and the apex controller (provided for the challenge)
public class DisplayCaseController {
 
    @AuraEnabled
    public static Case getCaseFromId(Id caseID) {
        if(caseID == null) {
            return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
        }
            List<Case> cases = [ SELECT Id, Subject, Description, Status from CASE where ID = :caseID ];
            if(cases.size() == 0) {
                return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
            } else {
                return cases[0];
        }
    }
}
and still when hitting the Check challenge button, the following error is displayed :
"Challenge not yet complete... here's what's wrong:
The component is not binding to the Case Subject value "

Could you please advise ?
Thanks a lot!



 
Hi there, I 'm trying to complete the "Automating Processes with the Lightning Process Builder" challenge in TrailHead but I get the following error :
Encountered unhandled fault when running process Update_contact_adress/
301240000004FXO exception by user/organization: 00D24000000JsNt/{4}

The flow failed to access the value for myVariable_current.Account.ShippingCountry because it hasn't been set or assigned.
caused by element : FlowRecordUpdate.myRule_1_A1
caused by: The flow failed to access the value for myVariable_current.Account.ShippingCountry because it hasn't been set or assigned.
Salesforce Error ID: 490660201-42718 (736882147)

Any idea what could be could wrong ?
 
Hi all,

I'm stuck in the Apex Integration Services - Apex SOAP Callouts challenge with the following message "The Apex class 'ParkLocator' does not appear to be calling the SOAP endpoint.".

Could you please advise ?
Hi,

I trying to validate trailhead challenge " Quick Start: Heroku Connect Provision the Heroku Connect Add-on " but I have the error :
"Step Not yet complete... here's what's wrong:
The Heroku Connect Add on has not been setup correctly. "

I don't understand why, cause I've checked the listen and write option and selected the 7 fields in the mapping.
Moreover the contact is correctly updated in Salesforce.

I have tested with region Europe and also United States as mentionned here : https://developer.salesforce.com/forums/?id=906F00000005IX8IAM
but still the same error message.

Could you please advise ?
Hello all,

I'm stuck with the Lightning challenge "Using Apex in Components" :

here is the component :
<aura:component controller="DisplayCaseController">
	<aura:attribute name="record" type="Case[]"/>

    <aura:iteration items="{!v.record}" var="c">
	    {!c.Subject}, {!c.Description}, {!c.Subject}, {!c.Status }
	</aura:iteration>
</aura:component>
the component controller :
({
    getRecord: function(cmp){
        var action = cmp.get("c.getCaseFromId");
        action.setCallback(this, function(response){
            var state = response.getState();
            console.log(state);
            if (state === "SUCCESS") {
                cmp.set("v.record", response.getReturnValue());
            }
        });
	 $A.enqueueAction(action);
    }
})
and the apex controller (provided for the challenge)
public class DisplayCaseController {
 
    @AuraEnabled
    public static Case getCaseFromId(Id caseID) {
        if(caseID == null) {
            return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
        }
            List<Case> cases = [ SELECT Id, Subject, Description, Status from CASE where ID = :caseID ];
            if(cases.size() == 0) {
                return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
            } else {
                return cases[0];
        }
    }
}
and still when hitting the Check challenge button, the following error is displayed :
"Challenge not yet complete... here's what's wrong:
The component is not binding to the Case Subject value "

Could you please advise ?
Thanks a lot!



 
I have working code that I use to create batches of new Contacts using input data in a CSV-formatted file.  The Contact column names are in the first row of the file, followed by one or more rows containing the values for each Contact that I need to create.  The working version of the code does not specify the OwnerId of the new Contact, so each Contact created is assigned to the default Owner value, which is the admin user that created the API session.

I need to modify the logic to assign a different Owner to the new Contacts that are created.  I found this section in the documentation, where it specifically refers to the "Owner" relationship.  I added "Owner.Id" as a new name to the first row of the CSV file, but when I attempt to create a new Contact, the upload fails with the message "InvalidBatch : Unable to find relationship:  Owner".  "Owner" is the name of the relationship that I can use successfully in the query, why doesn't it work in the batch create?

Does anyone have an idea about what I could be doing wrong?

Thanks for you time!

Hello,

Could anyone help me on how I get a mass edit on All Accounts which have a Status e.g. Customer.  I have serveral Workflows which need to run daily for these Customers.  However, the records need to be edited for the WF to trigger.

I'm not apex efficient and am not sure how to go about getting this done. 

 

I have seen this:  

in your developer console run the query. suppose your object is account.
List<Account> acc = [Select id from account limit 10000]; update acc

 

From this link: http://salesforce.stackexchange.com/questions/93434/trigger-a-mass-record-update-to-activate-workflow

But I am not sure where to start this?  Can anyone guide me please.

Thank you
Jin

Hello every one I have one problem I write my test class and it gives me 69% of code coverage, and i need 75% how can i get that. please help me

this is my class
trigger WishChildDuplicatePreventer on Opportunity (before insert,before update) {
     
     Map<String, Opportunity> OpportunityMap = new Map<String,Opportunity>();
     
     for (Opportunity Opportunity : System.Trigger.new)
           {
                if ((Opportunity.Form_No__c!= null) && 
                       (System.Trigger.isInsert || (Opportunity.Form_No__c!= System.Trigger.oldMap.get
                           (Opportunity.Id).Form_No__c)))
                  { 
                          
                    // This is check that new wish child isn't also a duplicate
                      if (OpportunityMap.containsKey(Opportunity.Form_No__c))
                       {
                         Opportunity.Form_No__c.addError('Another new Wish child has the' + 'same wish child.');
                       } 
                  else {
                          OpportunityMap.put(Opportunity.Form_No__c, Opportunity);
                       }
                } 
     }
     
          for (Opportunity Opportunity: [SELECT Form_No__c FROM Opportunity WHERE Form_No__c IN :OpportunityMap.KeySet()])
           {
               Opportunity newOpportunity = OpportunityMap.get(Opportunity.Form_No__c);
               newOpportunity.Form_No__c.addError('A Wish child with this Form No already exists ');
           }

}
And this is my Test class
@isTest
public class TestsWishChildDuplicatePreventer{
       static testMethod void testLeadDupPreventer() {
           
          Opportunity o = new Opportunity();
           o.Name = 'Raj';
           o.Form_No__c = '0001';
           o.Father_Name__c= 'Abc';
           o.Mobile__c='9898458211';
           o.StageName ='ToHave';
           o.CloseDate =date.parse('10/10/15');
           insert o;
           
            division__c  d = new division__c();
            d.name = 'Bangalore';
            d.landline__c = '+919234567890';
            d.mobile__c = '+919234567890';
            d.email__c= 'vivek@gmail.com';
            d.City__c = 'Hyd';
            d.state__c = 'Karnataka';
            d.pin_code__c = '560037';
            d.street__c = 'Whitefield';
            d.country__c = 'India';
            insert d;
            
            account a = new account();
               a.name = 'NIMS';
               a.phone = '+919234567890';
               a.email__c = 'vivek@gmail.com';
               a.BillingStreet = 'Marathahalli';
               a.BillingCity = 'Bangalore';
               a.BillingState = 'Karnataka';
               a.BillingPostalCode = '560037';
               a.BillingCountry = 'India';
               a.website__c= 'www.lntinfotech.com';    
               a.division__c= d.ID;
               insert a;
               
                o.name='Pratik';
                o.Form_No__c = '0002';
                o.Father_Name__c= 'XYZ';
                o.Mobile__c='9898458312';
                
                update o;
                
                 Map<String, Opportunity > OpportunityMap = new Map<String, Opportunity>();
                  for (Opportunity Opportunity: [SELECT Form_No__c FROM Opportunity WHERE Form_No__c IN :OpportunityMap.KeySet()])
                  {
                       Opportunity newOpportunity = OpportunityMap.get(Opportunity.Form_No__c);
                       newOpportunity.Form_No__c.addError('A Wish child with this Form No already exists ');
                  }
                
                delete o;
               
       }

}

Thanks in advance.
 
Hello,

The environment attached to my Trailhead account is expiring in 72 days, will I be blocked when it will be expired ?
Is it possible to remove this expiration or to attach it to another dev org ?
Hello there,

I'm trying to achieve the Build a Lemonade Stand App - Create Reports and Dashboards challenge and I have this error :

Challenge Not yet complete... here's what's wrong: 
The 'Sales Dashboard' dashboard does not have a Donut chart with the Order Total by Flavor report.

My dashboard does contain the report with a donut, could someone please advise ?

Thanks a lot.
Hi all, I am stuck on the prevent SOQL injection trailhead, where I am looking to determine which portions of the code I would need to invoke escapeSingleQuotes or whitelist to enable. I've made several attempts at investigation to little avail. I have appended my code are there any steps I would need to take. My goal is to assess the code to see how it works and what I would need to do.

Hope it helps.
 
public class Prevent_SOQL_Injection_Challenge {

    public string textOne {get; set;}
    public string textTwo {get; set;}
    public string comparator {get; set;}
    public string numberOne {get; set;}

    public List<Supply__c> whereclause_records {get; set;}


    public PageReference stringSearchOne(){
        string query = 'SELECT Id,Name,Quantity__c,Storage_Location__c,Storage_Location__r.Castle__c,Type__c FROM Supply__c';
        string whereClause = '';

        if(textOne != null && textOne!=''){
                whereClause += 'name like  \'%'+textOne+'%\' ';
        }

        if(whereClause != ''){
            whereclause_records = database.query(query+' where '+whereClause+' Limit 10');
        }

        return null;
    }


    public PageReference stringSearchTwo(){
        string query = 'SELECT Id,Name,Quantity__c,Storage_Location__c,Storage_Location__r.Castle__c,Type__c FROM Supply__c';
        string whereClause = '';

        if(textTwo != null && textTwo!=''){
                whereClause += 'Storage_Location__r.name like  \'%'+textTwo+'%\' ';
        }

        if(whereClause != ''){
            whereclause_records = database.query(query+' where '+whereClause+' Limit 10');
        }

        return null;
    }


    public PageReference numberSearchOne(){
        string query = 'SELECT Id,Name,Quantity__c,Storage_Location__c,Storage_Location__r.Castle__c,Type__c FROM Supply__c';
        string whereClause = '';

        if(numberOne != null && comparator != null){
            whereClause += 'Quantity__c '+comparator+' '+numberOne+' ';
        }

        if(whereClause != ''){
            whereclause_records = database.query(query+' where '+whereClause+' Limit 10');
        }

        return null;
    }

}

 
Can someone please give the complete Visualforce page code? Cannot get mine to work.
Hi,

I am making an apex rest callout and I am getting a list of objects
 
if (response.getStatusCode() == 200) {
            List<Object> results = (List<Object>) JSON.deserializeUntyped(response.getBody());
            // Cast the values in the 'equipements' key as a list
            List<Object> equipements = (List<Object>) results;
            System.debug('Received the following equipements:');
            for (Object equipement : equipements) {
                System.debug(equipement.get('cost'));

and I am getting an error "Method does not exist or incorrect signature: [Object].get(String)" when I try to access an ojbect field.

Here is an exemple of an object :
 
{_id=55d66226726b611100aaf741, cost=5000, lifespan=120, maintenanceperiod=365, name=Generator 1000 kW, quantity=5, replacement=false, sku=100003}
What is the right way to do it ?

Thanks a lot.

 
Hi,

I'm trying to validate step 5 for the Security Specialist superbadge "Set up reporting error" and I'm geeting the following error :

Challenge Not yet complete... here's what's wrong:
The Field Sales User profile does not appear to have the correct permission for create and customize reports.

I don't understand what's wrong cause I've check all reports permissions on the Field Sales User profile.

Could you please advice ?

Thanks.
Hi there,

Trying to check Reports & Dashboards Specialist step 2 and got this error :
 
Challenge Not yet complete... here's what's wrong:
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: LYWTXAJA
Could you please advise ?

Thanks a lot !
 
Hi all,

I'm stuck in the Apex Integration Services - Apex SOAP Callouts challenge with the following message "The Apex class 'ParkLocator' does not appear to be calling the SOAP endpoint.".

Could you please advise ?