• SaraHasNoLimits
  • NEWBIE
  • 64 Points
  • Member since 2013
  • Independent Salesforce/.NET Developer
  • Custom Solutions


  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 18
    Replies
I'm truly not a developer, and yet a Trailhead lesson is requiring me to perform as such to complete it.  

The subject Trailhead lesson says to Create A Lightning Action.  I've downloaded the indicated installation package for quickcontact lightning component.  However, I don't know where to go with step 2 below.  I tried to glean the needed information from the lesson, but, again, I'm not a developer and don't understand all the code.  If someone could point me in the right direction...using declaritive verbage...I would greatly appreciate it.

Thanks,  Scott
_____________________________________________________
To complete this challenge, you need to add a Lightning component to your org. Then use that component to create a Lightning action on the Account object. When the action’s button is clicked, it creates a new contact based on form input. To get started, install this package that contains the component bundle that you'll need to modify.
1. The Lightning component must be named quickContact.
2. Add the appropriate interfaces to the quickContact component. (Hint: there are two.)
3. Create a new action with Label Quick Contact and Name Quick_Contact on the Account object that invokes the quickContact component.
4. Add the action to the Account Layout page layout.
I would love to get more info on how the developer.salesforce.com website was built using LWR. When will that kind of information become available?
I am getting the following warning in the console even though my component is marked as access="global". This makes no sense to me. Is it possibly an issue with the debugger?

These are the warnings I get in the console whenever I click the checkbox.
WARNING: Access Check Failed! Component.getEvent():'click' of component 'markup://ui:inputCheckbox {22:37;a}' is not visible to ....
WARNING: Access Check Failed! AttributeSet.get(): attribute 'disableDoubleClicks' of component 'markup://ui:inputCheckbox {22:37;a}' .....
aura_proddebug.js:14495 WARNING: Access Check Failed! Component.getEvent():'change' of component 'markup://ui:inputCheckbox {22:37;a}'...

and this is the component markup:

<aura:component access="global" implements="force:appHostable,flexipage:availableForAllPageTypes" controller="ListRacesController">
    <aura:attribute name="races" type="Race__c[]"  />
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <!-- key here is that the handler has no name attribute specified when dealing with application event -->
    <aura:handler event="c:addToRaceList" action="{!c.handleAddToRaces}" />
    
    <ltng:require styles="/resource/slds100/assets/styles/salesforce-lightning-design-system.min.css"/>
    <div class="slds">
        <div class="slds-m-around--small slds-p-top--large">
            <div class="slds-card">
                <aura:iteration items="{!v.races}" var="race">
                    <header class="slds-card__header">
                        <ui:outputText class="slds-text-heading--label" value="{!race.Name}" />
                    </header>
                    <section class="slds-card__body">
                          <div class="slds-tile slds-hint-parent">
                              <p class="slds-tile__title slds-truncate">Race Type: 
                                  <ui:outputText value="{!race.Type__c}" />
                              </p>
                            <p class="slds-truncate">Location: 
                                <ui:outputText value="{!race.Location__c}"/>
                            </p>
                            <p class="slds-truncate">Date/Time:
                                <ui:outputDateTime value="{!race.DateTime__c}" />
                            </p>
                            <p class="slds-truncate">Attended?
                                <ui:inputCheckbox value="{!race.Attended__c}" />
                            </p>
                            <p class="slds-truncate">Results: 
                                <ui:inputTextArea value="{!race.Results__c}"/>
                            </p>
                        </div>
                    </section>
                </aura:iteration>
            </div>
        </div>
    </div>
</aura:component>



 
Is it possible to fire off an application event from a callback function? 

For example, could I do something like this"

createNewRace : function(component) {
        
        var race = component.get("v.newRace");
        this.insertRace(component, race, function(a) {
            console.log("Race successfully saved");
            var updateRace = $A.get("e.c:updateRaces");
            updateRace.setParams({ "race" : race });
            updateRace.fire(); 
        });
    },
    insertRace : function(component, race, callback) {
        var action = component.get("c.newRaceDB");
        action.setParams({ "race" : race });
        if (callback) {
            action.setCallback(this, callback);
        }
        $A.enqueueAction(action);
    }
I am getting the following error when I try to run a SOQL relationship query involving external objects: UNKNOWN ERROR: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1553848083-42327 (-438141556). I get this same error using the Force.com IDE, Workbench or Developer Console.

Are releationship queries not allowed for external objects? The docs said that up to 4 joins are allowed.

My query looks like this:

Select s.sarahasnolimits__LastName__c, s.sarahasnolimits__FirstName__c, (Select sarahasnolimits__InvDate__c, sarahasnolimits__Status__c, sarahasnolimits__TotalPrice__c From sarahasnolimits__Invoices__r) From sarahasnolimits__Customers__x s
I am trying to add a visualforce page to the sidebar and I would have previously done this with a page and an iFrame, but I read that with version 31.0, this is no longer the proper way to do this and that next year code that does this may stop working. So, I am using the Visualforce Area type for the component, but it requires that I enter a height. What if my content is dynamic? Can it not adjust dynamically, or do I just have to set it at a higher value and then use the scrollbars (which I hate, btw)?

Any better options for this new control type?

I have been reading through the Mobile API Developers Guide and was very interested in trying out the Mobile UI Elelemts Sample App. I was dissapointed by the lack of documentation surrounding this technique, since it gives no indication how to make the pages work in a Mobile app. I finally figured that bit out, but I see that the page it includes does not render (as in completley blank) on my iOS device.

It also does not render in Firefox or Chrome. When I use the Firefox developer tools, I can see that it is throwing the error Ploymer not defined. I know Polymer is at the core of this and I suspect this has to do with the fact that most modern browsers do not completley support it yet, but I wanted to see if anyone had any suggestions before I went too far down the rabbit hole on this one.

Anyone know how to get this working?

I have written a simple trigger, which executes fine, but when I created a testMethod to test the code, I am getting  the error, "Attempt to de-reference a null object". The code for the trigger is below:

trigger VenyuUpdateOrgId on Account (before insert, before update) {
//Get the value of the latest orgid that was used
Decimal OrgId = 0;
List<AggregateResult> results = [SELECT max(orgid__c) FROM Account];
for (AggregateResult ar:results)
    OrgId = (decimal) ar.get('expr0');

//Loop through all the accounts to be updated and check to see
//if they are of a particular type AND the OrgId is null. If they
//are, then we set the orgid to be the next value available
for (Account acc : trigger.new)  {
    if ((acc.Type=='Customer' || acc.Type=='Customer - Partner Account'
    || acc.Type=='Prospect - 30-day Trial') && acc.Orgid__c==NULL )
        acc.orgid__c = OrgId + 1;
}
}

I can see by going through the debug log that the problem happens because the AggregateResult query that gets the max value of a field named orgid__c is returning null.

My question is why is this happening in the testmethod and not in the actual trigger code that is executed?

My test class is this, btw:

@isTest
private class VenyuTestUpdateOrgIdTrigger {

    static testMethod void newAccount()  {
        //This method will test whether the trigger can handle
        //inserting 200 account records at once
        
        Account[] accsToCreate = new Account[]{};
        for (Integer i = 0; i < 200; i++) {
            Account acc = new Account();
            acc.Name = 'Test Account ';
            acc.Type = 'Customer';
            acc.Industry = 'Accounting';
            acc.Delivery_Team__c = 'Mercury';
            accsToCreate.add(acc);
        }
            
            Test.startTest();
            insert accsToCreate;
            Test.stopTest();
    }       
        
}

Oh, and I do not think the answer is to use GetAllData=True in the isTest annotation. But, I am not seeing what the problem is. Any help is appreciated.

Namaste

I am getting the following warning in the console even though my component is marked as access="global". This makes no sense to me. Is it possibly an issue with the debugger?

These are the warnings I get in the console whenever I click the checkbox.
WARNING: Access Check Failed! Component.getEvent():'click' of component 'markup://ui:inputCheckbox {22:37;a}' is not visible to ....
WARNING: Access Check Failed! AttributeSet.get(): attribute 'disableDoubleClicks' of component 'markup://ui:inputCheckbox {22:37;a}' .....
aura_proddebug.js:14495 WARNING: Access Check Failed! Component.getEvent():'change' of component 'markup://ui:inputCheckbox {22:37;a}'...

and this is the component markup:

<aura:component access="global" implements="force:appHostable,flexipage:availableForAllPageTypes" controller="ListRacesController">
    <aura:attribute name="races" type="Race__c[]"  />
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <!-- key here is that the handler has no name attribute specified when dealing with application event -->
    <aura:handler event="c:addToRaceList" action="{!c.handleAddToRaces}" />
    
    <ltng:require styles="/resource/slds100/assets/styles/salesforce-lightning-design-system.min.css"/>
    <div class="slds">
        <div class="slds-m-around--small slds-p-top--large">
            <div class="slds-card">
                <aura:iteration items="{!v.races}" var="race">
                    <header class="slds-card__header">
                        <ui:outputText class="slds-text-heading--label" value="{!race.Name}" />
                    </header>
                    <section class="slds-card__body">
                          <div class="slds-tile slds-hint-parent">
                              <p class="slds-tile__title slds-truncate">Race Type: 
                                  <ui:outputText value="{!race.Type__c}" />
                              </p>
                            <p class="slds-truncate">Location: 
                                <ui:outputText value="{!race.Location__c}"/>
                            </p>
                            <p class="slds-truncate">Date/Time:
                                <ui:outputDateTime value="{!race.DateTime__c}" />
                            </p>
                            <p class="slds-truncate">Attended?
                                <ui:inputCheckbox value="{!race.Attended__c}" />
                            </p>
                            <p class="slds-truncate">Results: 
                                <ui:inputTextArea value="{!race.Results__c}"/>
                            </p>
                        </div>
                    </section>
                </aura:iteration>
            </div>
        </div>
    </div>
</aura:component>



 
I would love to get more info on how the developer.salesforce.com website was built using LWR. When will that kind of information become available?
Hi,
I've a developer org, where I'm trying to create customer cummunity for testing. I was not able to create any community users. Please see below for all available licenses
User-added image
Hi I am doing the Assign Top Leads to Your Sales Rep Trailhead module >> https://trailhead.salesforce.com/trails/learn-admin-essentials/projects/prioritize-leads-with-einstein-lead-scoring/steps/assign-top-leads-to-your-sales-rep and when clicking on the Verify Step button at the bottom of the page I get an error
Step not yet complete... here's what's wrong:
We can't find criteria and immediate actions for Einstein Scores greater than or equal to 80.


This error message is not accurate as the steps in the process builder are there, however, I suspect the error is actually due to an email that I receive immediately after pressing the Verify Step button, I have copied and pasted the contents of the email below, any advice/help would be appreciated.

Subject: Developer script exception from Honeydew : 'LeadScoreGenerator' for job id '7071t000000V3oh' : Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

ApexApplication <info@jp.salesforce.com>12:03 (9 minutes ago)
to me
Apex script unhandled exception by user/organization: 0051t000000MOhX/00D1t000000DWM6

Failed to invoke future method 'public static void createScoreAndFactors(List<Id>)' on class 'LeadScoreGenerator' for job id '7071t000000V3oh'

caused by: System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

Class.LeadScoreGenerator.sendRequest: line 130, column 1
Class.LeadScoreGenerator.createScoreAndFactors: line 108, column 1
I'm truly not a developer, and yet a Trailhead lesson is requiring me to perform as such to complete it.  

The subject Trailhead lesson says to Create A Lightning Action.  I've downloaded the indicated installation package for quickcontact lightning component.  However, I don't know where to go with step 2 below.  I tried to glean the needed information from the lesson, but, again, I'm not a developer and don't understand all the code.  If someone could point me in the right direction...using declaritive verbage...I would greatly appreciate it.

Thanks,  Scott
_____________________________________________________
To complete this challenge, you need to add a Lightning component to your org. Then use that component to create a Lightning action on the Account object. When the action’s button is clicked, it creates a new contact based on form input. To get started, install this package that contains the component bundle that you'll need to modify.
1. The Lightning component must be named quickContact.
2. Add the appropriate interfaces to the quickContact component. (Hint: there are two.)
3. Create a new action with Label Quick Contact and Name Quick_Contact on the Account object that invokes the quickContact component.
4. Add the action to the Account Layout page layout.
Hi,

I'm stuck with a Lightning component that doesn't render. I get a strange error immediately: This page has an error. You might just need to refresh it. Error during init [Cannot read property 'apply' of undefined].

I'm stuck now for a long time and can't figure out what is wrong with the code. Here you can see my code:

Component:
<aura:component controller="CaseActivityTrackerCtrl" implements="flexipage:availableForAllPageTypes">

	<aura:attribute name="recordId" type="String" default='500b000000cOxah' />
	<aura:attribute name="case" type="Case" />
	<aura:attribute name="tasks" type="Task[]"/>

	<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

	<c:CaseActivityTrackerHeader />

	<aura:iteration items="{!v.tasks}" var="task">
		<c:CaseActivityTrackerTimeline task="{!task}"/>
	</aura:iteration>

	<aura:iteration items="{!v.tasks}" var="task">
		<h3>{!v.task.Subject}</h3>
	</aura:iteration>

	<h3>{!v.case.Subject}</h3>
	<h3>{!v.recordId}</h3>

</aura:component>
({
    doInit: function(component, event, helper) {
    	//helper.getCase(component, event);
		//helper.getTasks(component, event);
        // Set the attribute value. 
        // You could also fire an event here instead.
        component.set("v.recordId", "controller init magic!");
    }
})
App
 
<aura:application extends="force:slds">
    
    <c:CaseActivityTracker />
    
    <!-- 
    <c:camping />
	-->
    
</aura:application>

I really somebody can help me!
Thanks in advance, Stefan
 
Is it possible to fire off an application event from a callback function? 

For example, could I do something like this"

createNewRace : function(component) {
        
        var race = component.get("v.newRace");
        this.insertRace(component, race, function(a) {
            console.log("Race successfully saved");
            var updateRace = $A.get("e.c:updateRaces");
            updateRace.setParams({ "race" : race });
            updateRace.fire(); 
        });
    },
    insertRace : function(component, race, callback) {
        var action = component.get("c.newRaceDB");
        action.setParams({ "race" : race });
        if (callback) {
            action.setCallback(this, callback);
        }
        $A.enqueueAction(action);
    }
Hey there!

Can we use eclipse IDE for lightning development?
When I tried, don't see any technologies related to lightning like component, controllers, renderer etc.

We also use SVN for version tracking and finding hard time in new project which requires lightning framework completely.

Thanks in advance for y.ur response

I am in the process of developing a lightning component but I have been running into issues when using the lighting app builder.

When navigating to People Tab > My User > Edit Page, I receive this error:

User-added image

As you can see, an error has happened during load. Notice that the error is behind the loading <div> rendering it unclickable.

I thought that this was an error in my own code. I deleted all lightning code from my org and tried again:

User-added image

I received this error in the console:

User-added image

In the first picture of this post, I was able to remove the loading box by deleting <div class="auraMsgBox auraLoadingBox" id="auraLoadingBox"></div> from the dom. Behind it was this error:

Uncaught error in umps|NA16$00Dj0000000KmGP_005j0000000S88z_02_7bc8b1ef-5370-411e-8ba8-673ec79653ca|0| : Converting circular structure to JSON

Has anyone seen this before or know of a fix/workaround?

I am getting the following error when I try to run a SOQL relationship query involving external objects: UNKNOWN ERROR: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1553848083-42327 (-438141556). I get this same error using the Force.com IDE, Workbench or Developer Console.

Are releationship queries not allowed for external objects? The docs said that up to 4 joins are allowed.

My query looks like this:

Select s.sarahasnolimits__LastName__c, s.sarahasnolimits__FirstName__c, (Select sarahasnolimits__InvDate__c, sarahasnolimits__Status__c, sarahasnolimits__TotalPrice__c From sarahasnolimits__Invoices__r) From sarahasnolimits__Customers__x s
 when i start integration salesforce with TFS i got the following error, pls i need urgent help.

"Unable to generate a temporary class (result=1).
error CS0029: Cannot implicitly convert type 'TFS.Enterprise.ListViewRecordColumn' to 'TFS.Enterprise.ListViewRecordColumn[]'"
Hi,

With Winter 15 upgrade in our sandbox we are unable to consume the soap wsdl for one of our custom web services. The WSDL is downloaded and has reference to some additional namespaces "ns1" and "ns2". When I try to import this wsdl in .net or SOAPUI, it errors out "WSDL cannot be imported". 

Any pointers?
One of my aggregate result SOQL queries is getting the error, System.ListException: Row with null Id at index: 0.  If I'm correct this tells me that the query came up with no results.  What's confusing is that I have another aggregate result that is super similar that works just fine.  Can anyone please help explain how to fix this?  Thanks in advance!

Problem code:
//Aggreate SOQL to get next scheduled task
Map<Id,AggregateResult> LDRnextTaskSummary = new Map<Id,AggregateResult>([SELECT WhoId LeadId, MIN(CreatedDate) NextDate FROM Task WHERE (WhoId IN: leadIds) AND (Owner.Profile.Name LIKE '%LDR%') AND (Status = 'Not Started' OR Status = 'In Progress') AND (ActivityDate >= TODAY) GROUP BY WhoId]);

Similar SOQL That Works:
//Aggregate SOQL to get First and Last Tasks
  Map<Id,AggregateResult> LDRpastTaskSummary = new Map<Id,AggregateResult>([SELECT WhoId LeadId, MIN(CreatedDate) FirstDate, MAX(CreatedDate) LastDate FROM Task WHERE (WhoId IN :leadIds) AND (Owner.Profile.Name LIKE '%LDR%') AND (Status = 'Completed') GROUP BY WhoId]);

Was testing and this also got the same error:
Map<Id,AggregateResult> LDRnextTaskSummary = new Map<Id,AggregateResult>([SELECT WhoId LeadId, MIN(CreatedDate) NextDate FROM Task WHERE (WhoId IN: leadIds) AND (Owner.Profile.Name LIKE '%LDR%') GROUP BY WhoId]);

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