• Linked2Mark
  • NEWBIE
  • 65 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 20
    Replies
Hi all and thanks for any input provided. I would like to retrieve the metadata that defines the answer to the following setting which is in Feature Settings => Marketing+ Lead Settings: 'The behavior used when applying assignment rules to manually created records.'

Does anyone know where it is located? What would the package look like?
Many thanks
Might seem like a dumb question but I would like to confirm this with the community.

I am checking inbound data from another system that inserts (essentialy) a CSV into a custom object that I have created. I  have multiple validity checks that run on the data and I would like to use multiple methods of the same class to analyze the inbouund data.

So - if pass trigger.new to say - method 1 - which makes changes to the trigger and then in the very next line pass the trigger to mthod 2, are the changes made in method 1 preserved and visible by method 2?
This seems like it should be something I should know but I have never actually done this.

Many thanks
Hi. I am writing a trigger that will require a return of data from a before update helper back to the trigger so that I can pass the info to the after update section of the trigger. I 'thought' I could creat a user class in the trigger and then reference it in the trigger helper but I am getting an Invalid Type errror in the trigger helper. Code is below.

The real question is - how can pass a user class back to the trigger from the trigger helper so that I can use it in the after update section of the trigger?

Any thoughts? Many thanks
trigger LeadTrigger on Lead (after delete, after insert, after undelete, after update, before delete, before insert, before update) {

    List<leadIdBDSandTypeofEMail> leadToBDSForEmail = new List<leadIdBDSandTypeofEMail>();
    Id idOfLastBDStoGetLead;
    Boolean weShouldBumpLead;

    /*
    public static void leadRoundRobin(
    List<Lead> newTrigger,
    List<Lead> oldTrigger,
    Map<Id, Lead> oldMap,
    Id idOfLastBDStoGetLead,
    Boolean weShouldBumpLead,
	List<leadIdBDSamdTypeofEMail> leadToBDSForEmail)
    */

    
    if((trigger.isInsert || trigger.isUpdate) && trigger.isBefore){
    	
    	LeadTriggerHelper.leadRoundRobin(trigger.new, trigger.old, trigger.oldMap);

    }
    
    if((trigger.isInsert || trigger.isUpdate) && trigger.isAfter){
    	
    	LeadTriggerHelper.createTasksEmails(trigger.new, trigger.old, trigger.oldMap);

    }
    public class leadIdBDSandTypeofEMail{
        public Id idofLead;
        public Id idOfBDS;
        public string typeOfEmail;

    }

}
 
public with sharing class LeadTriggerHelper {

	public static void leadRoundRobin(List<Lead> newTrigger, List<Lead> oldTrigger, Map<Id, Lead> oldMap){

		List<LeadTrigger.leadIdBDSandTypeofEMail> returnLeadBDType = new List<leadIdBDSandTypeofEMail>();

... and lots more code that is irrelevant to the question....

 

I have a VF page that is not working properly and I cant figure out why. Page and controller are shown below. The page wont build as I am getting the following error.

Error:(1, 1) Unknown property 'TasksHomePageController.eAllTasks.taskSubject'

It looks like the page cant see the fields in the wrapper class. Cant figure out why that is happening. Any tips?

<apex:page id="TasksHomePage" Controller="TasksHomePageController">
    <apex:stylesheet value="/resource/SLDS0102/assets/styles/salesforce-lightning-design-system-ltng.css"/>
    <apex:pageBlock title="Unresolved Emails">
        <apex:outputText value="There are {0} incomplete Tasks." >
            <apex:param value="{!allTasksSize}"/>
        </apex:outputText>
        <br></br>            <br></br>

        <apex:pageBlockTable value="{!allTasks}" var="myTask">

            <apex:column value="{!myTask.taskSubject}"/>
            <apex:column value="{!myTask.taskStatus}"/>
            <apex:column value="{!myTask.TaskType}"/>
            <apex:column value="{!myTask.TaskActivityDate}"/>
            <apex:column value="{!myTask.TaskAccount}"/>
        </apex:pageBlockTable>


    </apex:pageBlock>
</apex:page>
 
public with sharing class TasksHomePageController {
    public List<Task>       allTasks {get; set;}
    public List<eAllTasks>  eAT {get; set;}
    public Integer          allTasksSize  {get; set;}

    public TasksHomePageController() {
        Id usrid = UserInfo.getUserId() ;
        allTasks = [Select Id, Subject, WhoId, WhatId,  ownerId, status, type, activityDate, CreatedDate FROM Task
            Where OwnerId = :usrId and status!= 'Completed'];
        allTasksSize = allTasks.size();
        system.debug('allTasks.size() is ==> ' + allTasks.size());

        for(Task t :allTasks){
            eAllTasks e                     = new eAllTasks();
            e.taskSubject                   = t.Subject;
            e.TaskId                        = t.Id;
            e.taskWhoId                     = t.WhoId;
            e.taskWhatId                    = t.WhatId;
            e.taskOwnerId                   = t.OwnerId;
            e.taskStatus                    = t.Status;
            e.taskActivityDate              = t.ActivityDate;
            e.taskType                      = t.Type;
            e.taskWhoIdType                 = String.ValueOf(t.WhoId).substring(0,3);

            system.debug(' e is ==> ' + e);
            eAT.add(e);
            system.debug('eAT.size() is ==> ' + eAT.Size());
        }

        List<Id>        contactIDsInTasks       = new List<Id>();
        List<Id>        leadIDsInTasks          = new List<Id>();

        // WhoId that starts with 'oo3' is a Contact
        // WhoId that starts with '00Q is a Lead
        if(eAT.size() > 0){
            for(eAllTasks e :eAT){
                if(e.taskWhoIdType ==  '003'){
                    contactIDsInTasks.add(e.taskWhoId);
                } else if(e.taskWhoIdType == '00Q'){
                    leadIDsInTasks.add(e.taskWhoId);
                }
            }
        }
        List<Contact>   contactsInTasks = new List<Contact>();
        List<Lead>      leadsInTasks    = new List<Lead>();

        If(contactsInTasks.size() > 0){
            contactsInTasks = [SELECT Id, Account.Name FROM Contact WHERE ID IN :contactIDsInTasks];
        }
        if(leadIDsInTasks.size() > 0){
            leadsInTasks = [SELECT ID, Company FROM Lead WHERE ID IN :leadIDsInTasks];
        }
        //Create the maps here - map the eAT to the COntact or Lead
        Map<Id, Contact> contactMap = new Map<id, Contact>();
        Map<Id, Lead>   leadMap     = new Map<id, Lead>();
        if(contactsInTasks.size() > 0){
            for(Contact c :contactsInTasks){
                contactMap.put(c.Id, c);
            }
        }
        If(leadsInTasks.size() > 0){
            for(Lead l :leadsInTasks){
                leadMap.put(l.id, l);
            }
        }

         // everything is ready - now Get the Account Name from either the Contact or Lead

        if(eAT.size() > 0){
            for(eAllTasks e :eAT){
                if(contactMap.get(e.TaskWhoId) != null){
                    e.taskAccount = contactMap.get(e.TaskWhoId).Account.Name;
                } else if(leadMap.get(e.TaskWhoId) != null){
                    e.taskAccount = leadMap.get(e.TaskWhoId).Company;
                }
            }
        }
    }
    public class eAllTasks{

            string      taskSubject;
            Id          TaskId;
            Id          taskWhoId;
            Id          taskWhatId;
            id          taskOwnerId;
            string      taskStatus;
            date        taskActivityDate;
            string      taskAccount;
            string      taskWhoIdType;
            string      taskType;
    }
The Contact object already has two lookup fields to User: Created By and Owner. I would like to add a third that will be used to indicate responsibility for for marketing activities.  In other words, a Contact will be owned by someone - someone who is a field based salesperson - yet will have someone who is assigned from the Inside Sales team to communicate with the Contact for other issues. Looks like I am unable to do that because adding the lookup would be a third lookup to the User object.

I can use a junction object but that will make things significantly more complicated. Does anyone have a workaround or idea to make this work? Am I missing something?
Anyone have an idea why I am unable to edit the value of a Task field in a trigger? I have checked the Field Level Security on the 'Type' field and it is visible and is not marked as Read Only. Yet when the trigger fires - it throws an error when I say - Trigger.new[i].Type = 'Email';

Many thanks for your help.
trigger Task_UpdateLastContact on Task (after insert, after update) {
	public boolean weShouldUpdateContacts = Validator_cls.runUpdateContactsFromTasks('get', true);
	if(weShouldUpdateContacts){
	    Set<Id> neededRT = new Set<Id>();
	    neededRT.addAll(zTest_Shared.GetRecordTypeIdBySObjectAndName('Task', new Set<String>{
	    	'ESI - Inside Sales Task',
	    	'ESI - Outbound Call Log',
	    	'ESI - Task'
	    }).values());
	    Set<Id> newTriggerIds = new Set<Id>();
	  	system.debug('neededRT.contains(Trigger.new[0].RecordTypeId) is ' + neededRT.contains(Trigger.new[0].RecordTypeId));
	
	    if(neededRT.contains(Trigger.new[0].RecordTypeId)){    
	
	        String oldStatus = '';
	    
	        for (Integer i = 0; i < Trigger.new.size(); i++){
					
	                if (Trigger.isInsert)
	                    oldStatus = '';
	                    if(Trigger.new[i].Description.contains('Additional To:')){
	                    	system.debug('<== This came from Outlook ==>');
	                    	Trigger.new[i].Type = 'Email';
	                    }
	                else
	                    oldStatus = Trigger.old[i].Status;
	                
	                //Create the set of Ids that get passed to the Future method
	             
	                if((Trigger.new[i].Status == 'Completed - Effective' //small dash
	                  || Trigger.new[i].Status == 'Completed – Effective' //large dash
	                  || Trigger.new[i].Status == 'Completed')
	                && Trigger.new[i].Status != oldStatus)
	                {
	            		newTriggerIds.add(Trigger.new[i].Id);
	                }
	
	        }       
	    }
	    updateLastContacted.updateLastContacted(newTriggerIds);
	}
}

 

This may sound weird but I thought someone might have a tip for me.

I am working on an org that has a custom object called Scheduler_Access__c. I appears in controllers and VF pages and when I use Dataloader I can offload and update data. However - it does not appear in the Custom Objects in the Admin UI. 

Why would that be?

I am working through APEX Web services in the Apex Integration Services Trailhead. I would like to get the APEX super badge so that I can take the Platform Dev 2 Cert Test. I am afraid my debugging skills arent so super at the moment. :-(

I have the following code (directly from the Trailhead) 

@RestResource(urlMapping='/Cases/*')
global with sharing class CaseManager {

    @HttpGet
    global static Case getCaseById() {
        RestRequest request = RestContext.request;
        // grab the caseId from the end of the URL
        String caseId = request.requestURI.substring(
          request.requestURI.lastIndexOf('/')+1);
        Case result =  [SELECT CaseNumber,Subject,Status,Origin,Priority
                        FROM Case
                        WHERE Id = :caseId];
        return result;
    }

    @HttpPost
    global static ID createCase(String subject, String status,
        String origin, String priority) {
        Case thisCase = new Case(
            Subject=subject,
            Status=status,
            Origin=origin,
            Priority=priority);
        insert thisCase;
        return thisCase.Id;
    }   

    @HttpDelete
    global static void deleteCase() {
        RestRequest request = RestContext.request;
        String caseId = request.requestURI.substring(
            request.requestURI.lastIndexOf('/')+1);
        Case thisCase = [SELECT Id FROM Case WHERE Id = :caseId];
        delete thisCase;
    }     

    @HttpPut
    global static ID upsertCase(String subject, String status,
        String origin, String priority, String id) {
        Case thisCase = new Case(
                Id=id,
                Subject=subject,
                Status=status,
                Origin=origin,
                Priority=priority);
        // Match case by Id, if present.
        // Otherwise, create new case.
        upsert thisCase;
        // Return the case ID.
        return thisCase.Id;
    }

    @HttpPatch
    global static ID updateCaseFields() {
        RestRequest request = RestContext.request;
        String caseId = request.requestURI.substring(
            request.requestURI.lastIndexOf('/')+1);
        Case thisCase = [SELECT Id FROM Case WHERE Id = :caseId];
        // Deserialize the JSON string into name-value pairs
        Map<String, Object> params = (Map<String, Object>)JSON.deserializeUntyped(request.requestbody.tostring());
        // Iterate through each parameter field and value
        for(String fieldName : params.keySet()) {
            // Set the field and value on the Case sObject
            thisCase.put(fieldName, params.get(fieldName));
        }
        update thisCase;
        return thisCase.Id;
    }    

}
When I use Workbench to hit the url: /services/apexrest/Cases/

I get an error:

HTTP/1.1 404 Not Found Date: Tue, 27 Feb 2018 23:10:19 GMT Strict-Transport-Security: max-age=31536002; includeSubDomains Public-Key-Pins-Report-Only: pin-sha256="9n0izTnSRF+W4W4JTq51avSXkWhQB8duS2bxVLfzXsY="; pin-sha256="5kJvNEMw0KjrCAu7eXY5HZdvyCS13BbA0VJG1RSP91w="; pin-sha256="njN4rRG+22dNXAi+yb8e3UMypgzPUPHlv4+foULwl1g="; max-age=86400; includeSubDomains; report-uri="https://calm-dawn-26291.herokuapp.com/hpkp-report/00D37000000JkeWp"; X-Robots-Tag: none Cache-Control: no-cache,must-revalidate,max-age=0,no-store,private Set-Cookie: BrowserId=hI2Gh0BrQFCMm-_6mBuA7Q;Path=/;Domain=.salesforce.com;Expires=Sat, 28-Apr-2018 23:10:19 GMT;Max-Age=5184000 Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked
[ { "errorCode" : "NOT_FOUND", "message" : "Could not find a match for URL" } ]

 

Seems like this ought to work. Any ideas what I am doing wrong?

 

Many thanks

Hi. I would like to create a button that can be shown on the Case related List on an Opportunity detail page. When the button is clicked I would like to pass the Opportunity Id. Cant see a standard button mechanism to do that when creating the button from the Case Object. Will I need to create some type of custom list view that I can display in place of the standard related list? The url for the button would look something like:

apex/caseLandingPage?id={!opportunityId} 
the challenge is that I dont know how to grab the Opportunity ID.

Any input appreciated.

Hi All. I have worked my way through the first two modules of this trailhead and have hit a wall. I create the classs as described in the Trailhead - the class is called 'CaseManager'. I then use Workbench to hit the uri '//na35.salesforce.com/services/apexrest/rest/cases/' but get a response that is different than the example. I get:

 

HTTP/1.1 404 Not Found Date: Thu, 22 Jun 2017 22:19:56 GMT Strict-Transport-Security: max-age=0; includeSubDomains X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Content-Security-Policy: referrer origin-when-cross-origin; upgrade-insecure-requests Set-Cookie: BrowserId=HvJXbI8uQsO7m9UwN4_40Q;Path=/;Domain=.salesforce.com;Expires=Mon, 21-Aug-2017 22:19:56 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked

any ideas what I am doing wrong?

I am in this unit and it says:

From Setup, enter Apps in the Quick Find box, then select App Manager.

You should see the Lightning Experience App Manager Setup page.

I must be missing something because I dont see that in a Dev org. I see 'App Menu' under Manage Apps and 'Apps' under create.

Any tips on how I can see Lightning Experience App Manager Setup? 

I am reasonably certain this is a SF issue but thought I would post on the outside chance that anyone had a tip.

I am asking for some tips because I have a tendency to make things more complicated that they probably should.

If the answer on this challenge were a piece of code, it would be easy. Just asign a value to each of the five fields that you want to check for and add up the values. I dont see how to do that in a formula. The if statement just looks so gnarly that I cant imagine that I am doing it with a nested if.

Has anyone finished this? Can you give me any tips on how to dcomplete the challenge? I am stumped.

Many thanks, 
Mark

I am working through 'Routing Records with Approvals'. I am finished with the creation of the Approval to satisfy the challenge but the Approval wont activate. I click the Activate button and nothing happens? 

Any tips?

I have market data that is reported by MSA. Each record in the MSA contains a field with the estimate gross commission available in the account named in the record. I would like to create a report that averages the top five accounts based on gross commission volume and then compares that average to an account that the user selects.

I can see how to do with a series of SQL statements but cant see how to do it with a custom report.

Any thoughts?

I am using dataloader.io to set import contacts on the oppportunity object. I match the opportunity Record Id to the contact Record Id and everything shows up in the right opportunity. Here is the problem - I am importing 'IsPrimary' set to 'true'. When I look in the opportunity page - the contact appears but it doesnt appear as the primary contact.

Any tips? 
Hi all. I have a dev instance that I use for test purposes. I know that the answer to this question is simple - how can I create a separate, different org that is clean? I would like it so that I can discuss base functionality with clients.

Many thanks
I am working to complete the internediate trailhead 'Controlling access to the organization' module. I need to create a user that has an administrator profile. My user name uses the administrator profile so I am attempting to copy it in order to complete the challenge. When I look at my own profile, I can see that the user license is 'Salesforce'.  when creating a new user, the 'Salesforce' license is not available. The 'Salesforce Platform' is available but it does not appear to have a system administrator profile available.

Any tips?

I think I must be doing something incorrectly in the challenge for this segment. When I open the Approval Process Jump Start Wizard, it does not appear to match the process outlined in Trailhead. Am I the only one who sees this? 

 

Could also use some help to 'Verify Chatter Approvals is enabled and the Case standard object has Chatter feed tracking turned on.' which is the first part of the challenge.

I am working through the SendEmail example and can't get my code to run. Can't figure out why. 
I copied the code out of the example - removing all of the line numbers - into EmailManager.apxc
I copied the following Apex code into and anonymous debug window: 
EmailManager em = new EmailManager();
em.sendMail('myemailaddress@gmail.com', 'Trailhead Tutorial', '123 body');

Window opens with the message:

Line: 2, Column: 1
Method does not exist or incorrect signature: [EmailManager].sendMail(String, String, String)

It cant see my method for some reason - any tips?

The Contact object already has two lookup fields to User: Created By and Owner. I would like to add a third that will be used to indicate responsibility for for marketing activities.  In other words, a Contact will be owned by someone - someone who is a field based salesperson - yet will have someone who is assigned from the Inside Sales team to communicate with the Contact for other issues. Looks like I am unable to do that because adding the lookup would be a third lookup to the User object.

I can use a junction object but that will make things significantly more complicated. Does anyone have a workaround or idea to make this work? Am I missing something?
Might seem like a dumb question but I would like to confirm this with the community.

I am checking inbound data from another system that inserts (essentialy) a CSV into a custom object that I have created. I  have multiple validity checks that run on the data and I would like to use multiple methods of the same class to analyze the inbouund data.

So - if pass trigger.new to say - method 1 - which makes changes to the trigger and then in the very next line pass the trigger to mthod 2, are the changes made in method 1 preserved and visible by method 2?
This seems like it should be something I should know but I have never actually done this.

Many thanks
Anyone have an idea why I am unable to edit the value of a Task field in a trigger? I have checked the Field Level Security on the 'Type' field and it is visible and is not marked as Read Only. Yet when the trigger fires - it throws an error when I say - Trigger.new[i].Type = 'Email';

Many thanks for your help.
trigger Task_UpdateLastContact on Task (after insert, after update) {
	public boolean weShouldUpdateContacts = Validator_cls.runUpdateContactsFromTasks('get', true);
	if(weShouldUpdateContacts){
	    Set<Id> neededRT = new Set<Id>();
	    neededRT.addAll(zTest_Shared.GetRecordTypeIdBySObjectAndName('Task', new Set<String>{
	    	'ESI - Inside Sales Task',
	    	'ESI - Outbound Call Log',
	    	'ESI - Task'
	    }).values());
	    Set<Id> newTriggerIds = new Set<Id>();
	  	system.debug('neededRT.contains(Trigger.new[0].RecordTypeId) is ' + neededRT.contains(Trigger.new[0].RecordTypeId));
	
	    if(neededRT.contains(Trigger.new[0].RecordTypeId)){    
	
	        String oldStatus = '';
	    
	        for (Integer i = 0; i < Trigger.new.size(); i++){
					
	                if (Trigger.isInsert)
	                    oldStatus = '';
	                    if(Trigger.new[i].Description.contains('Additional To:')){
	                    	system.debug('<== This came from Outlook ==>');
	                    	Trigger.new[i].Type = 'Email';
	                    }
	                else
	                    oldStatus = Trigger.old[i].Status;
	                
	                //Create the set of Ids that get passed to the Future method
	             
	                if((Trigger.new[i].Status == 'Completed - Effective' //small dash
	                  || Trigger.new[i].Status == 'Completed – Effective' //large dash
	                  || Trigger.new[i].Status == 'Completed')
	                && Trigger.new[i].Status != oldStatus)
	                {
	            		newTriggerIds.add(Trigger.new[i].Id);
	                }
	
	        }       
	    }
	    updateLastContacted.updateLastContacted(newTriggerIds);
	}
}

 
I want to preface that I am using the newest version of files for Salesforce Lightning, not classic Notes and Attachments.

We want to ensure that at least one file is uploaded to an opportunity in notes and attachments ( we have enabled files so the upload is of Salesforce files ). 

I cannot see how validation is possible from the opportunity itself. Is anyone doing this without using Process Builder or a Trigger? 

Thanks in Advance.

I am working through APEX Web services in the Apex Integration Services Trailhead. I would like to get the APEX super badge so that I can take the Platform Dev 2 Cert Test. I am afraid my debugging skills arent so super at the moment. :-(

I have the following code (directly from the Trailhead) 

@RestResource(urlMapping='/Cases/*')
global with sharing class CaseManager {

    @HttpGet
    global static Case getCaseById() {
        RestRequest request = RestContext.request;
        // grab the caseId from the end of the URL
        String caseId = request.requestURI.substring(
          request.requestURI.lastIndexOf('/')+1);
        Case result =  [SELECT CaseNumber,Subject,Status,Origin,Priority
                        FROM Case
                        WHERE Id = :caseId];
        return result;
    }

    @HttpPost
    global static ID createCase(String subject, String status,
        String origin, String priority) {
        Case thisCase = new Case(
            Subject=subject,
            Status=status,
            Origin=origin,
            Priority=priority);
        insert thisCase;
        return thisCase.Id;
    }   

    @HttpDelete
    global static void deleteCase() {
        RestRequest request = RestContext.request;
        String caseId = request.requestURI.substring(
            request.requestURI.lastIndexOf('/')+1);
        Case thisCase = [SELECT Id FROM Case WHERE Id = :caseId];
        delete thisCase;
    }     

    @HttpPut
    global static ID upsertCase(String subject, String status,
        String origin, String priority, String id) {
        Case thisCase = new Case(
                Id=id,
                Subject=subject,
                Status=status,
                Origin=origin,
                Priority=priority);
        // Match case by Id, if present.
        // Otherwise, create new case.
        upsert thisCase;
        // Return the case ID.
        return thisCase.Id;
    }

    @HttpPatch
    global static ID updateCaseFields() {
        RestRequest request = RestContext.request;
        String caseId = request.requestURI.substring(
            request.requestURI.lastIndexOf('/')+1);
        Case thisCase = [SELECT Id FROM Case WHERE Id = :caseId];
        // Deserialize the JSON string into name-value pairs
        Map<String, Object> params = (Map<String, Object>)JSON.deserializeUntyped(request.requestbody.tostring());
        // Iterate through each parameter field and value
        for(String fieldName : params.keySet()) {
            // Set the field and value on the Case sObject
            thisCase.put(fieldName, params.get(fieldName));
        }
        update thisCase;
        return thisCase.Id;
    }    

}
When I use Workbench to hit the url: /services/apexrest/Cases/

I get an error:

HTTP/1.1 404 Not Found Date: Tue, 27 Feb 2018 23:10:19 GMT Strict-Transport-Security: max-age=31536002; includeSubDomains Public-Key-Pins-Report-Only: pin-sha256="9n0izTnSRF+W4W4JTq51avSXkWhQB8duS2bxVLfzXsY="; pin-sha256="5kJvNEMw0KjrCAu7eXY5HZdvyCS13BbA0VJG1RSP91w="; pin-sha256="njN4rRG+22dNXAi+yb8e3UMypgzPUPHlv4+foULwl1g="; max-age=86400; includeSubDomains; report-uri="https://calm-dawn-26291.herokuapp.com/hpkp-report/00D37000000JkeWp"; X-Robots-Tag: none Cache-Control: no-cache,must-revalidate,max-age=0,no-store,private Set-Cookie: BrowserId=hI2Gh0BrQFCMm-_6mBuA7Q;Path=/;Domain=.salesforce.com;Expires=Sat, 28-Apr-2018 23:10:19 GMT;Max-Age=5184000 Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked
[ { "errorCode" : "NOT_FOUND", "message" : "Could not find a match for URL" } ]

 

Seems like this ought to work. Any ideas what I am doing wrong?

 

Many thanks

the question in the challenge is:The method must return the ID and Name for the requested record and all associated contacts with their ID and Name.

but ppl have passed the trailhead by using similar code:
Account result =  [Select Id,Name ,(Select Id, Name From Contacts) From Account where Id = :accId];
        return result;

When i put this in the execute anonymous window:-
Account result =  [Select Id,Name ,(Select Id, Name From Contacts) From Account where Id = '00128000005ee4zAAA'];
system.debug(result);

I get only the account id i do not get the contact ids related to it.
How to go about doing it?
Please help. 

I am asking for some tips because I have a tendency to make things more complicated that they probably should.

If the answer on this challenge were a piece of code, it would be easy. Just asign a value to each of the five fields that you want to check for and add up the values. I dont see how to do that in a formula. The if statement just looks so gnarly that I cant imagine that I am doing it with a nested if.

Has anyone finished this? Can you give me any tips on how to dcomplete the challenge? I am stumped.

Many thanks, 
Mark

I am working through 'Routing Records with Approvals'. I am finished with the creation of the Approval to satisfy the challenge but the Approval wont activate. I click the Activate button and nothing happens? 

Any tips?

Hi everyone,

i'm getting the following error after the system checks the challenge:

"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.QueryException: List has no rows for assignment to SObject"

I already tested it via Apex and via REST Explorer in Workbench, the code seems fine to me:

@restResource(urlMapping='/Account/*/contacts')
global class AccountManager {
	
    @httpGet
    global static Account getAccount(){
        RestRequest request = RestContext.request;
        String accountId = request.requestURI.substringBetween('/Account/' , '/contacts');
        
        Account result = [SELECT Id, Name, (SELECT Id,Name FROM Contacts) FROM Account WHERE Id = :accountId];
  
        return result;

    }
    
}


Can somebody help me with this?

Thank you,
Fabio

I have market data that is reported by MSA. Each record in the MSA contains a field with the estimate gross commission available in the account named in the record. I would like to create a report that averages the top five accounts based on gross commission volume and then compares that average to an account that the user selects.

I can see how to do with a series of SQL statements but cant see how to do it with a custom report.

Any thoughts?

We are trying to create a global action which is dynamic (as it can be added for any sObject).
However we need to fetch the current recordId from the detail page of the sObject's record into our VisualForce page(which is called from global action). We can't use a standard controller in VF page to fetch the Id as the action can be fired from any sObject.

The URL we see for record detail page in Lightning Experience window is - 
https://trekbindev-dev-ed.lightning.force.com/one/one.app?source=aloha#/sObject/001B0000004XwqlIAC/view?t=1441350807320

The javascript's methods for fetching URL doesn't seem to give the recordId in Lightning view either, as the page is opening in iFrame, screenshot
is added below:
VF page opening in iFrame

However, this function was achieved via button to add ID parameter in page for SF Classic UI, it is as follows.

Button

How can we accomplish this in Lightning Experience?

Thanks in advance!
I am working to complete the internediate trailhead 'Controlling access to the organization' module. I need to create a user that has an administrator profile. My user name uses the administrator profile so I am attempting to copy it in order to complete the challenge. When I look at my own profile, I can see that the user license is 'Salesforce'.  when creating a new user, the 'Salesforce' license is not available. The 'Salesforce Platform' is available but it does not appear to have a system administrator profile available.

Any tips?
I'm working on this module in trailhead:

https://developer.salesforce.com/trailhead/project/quickstart-app-builder/quickstart-app-builder3

In Lightning Builder, it says:

"From the Custom Components list, drag the ContactsNearby component to below the My Top Accounts Filter List in the left column."

I do not see that component, ContactsNearby. All I see is ContactsToday and Opportunity Alert.

Any ideas?

 

Trailhead is bugging out on accepting my completed challenge (I think). 

The task is: "In '3 - Sales & Marketing Adoption' dashboard, change the dashboard component for 'New LEAD Trend by Source' to a pie chart and set the wedges to Lead Source"

As you can see by the attached picture - I have completed the steps.

The picture may be hard to see- but wedges are set to lead source. I keep getting an error message that it is not. Bug fix?

Hi, I want to connect Eclipse IDE with my Salesforce Org. When I give my credentials, it says "unable to fetch organization details". Can anyone help to solve this issue?
 screenshot

We are using the Databasedotcom Ruby gem (essentially a REST wrapper) to authenticate to salesforce. The OAuth dance is randomly failing (1 out of 25 attempts) with the following message: 

 

client identifier invalid

 

The code is almost boilerplace code for authentication:

 

def self.authenticate(username, password)
  config = YAML.load_file(File.join(::Rails.root, 'config', 'databasedotcom.yml'))
  client = Databasedotcom::Client.new(config)
  begin
    access_token = client.authenticate :username => username, :password => password
    {:success => 'true', :message => 'Successful sfdc login.', :access_token => access_token}
  rescue Exception => exc
    {:success => 'false', :message => exc.message}
  end
end

 

Any ideas what could be causing it to fail randomly?

 

Thanks

 

Jeff Douglas

Appirio & CloudSpokes

http://blog.jeffdouglas.com