• Rick Upton
  • NEWBIE
  • 109 Points
  • Member since 2015
  • Consultant


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 2
    Questions
  • 34
    Replies
Getting error message while trying to complete Trailhead challenge

Action failed: c:AccountMap$controller$accountsLoaded [Cannot read property 'length' of undefined]
Callback failed: apex://AccountController/ACTION$findAll
Failing descriptor: {c:AccountMap$controller$accountsLoaded}

Also when trying to save the challenge error message:
The AccountMap component does not handle the 'AccountSelected' event.

Need Assistance
Hello, I have a change set with an active flow definition included. The flow is called "Create Journals" and it is on version 27 from my Development sandbox.
change set with Flow

When attempted to deploy this change set into another sandbox, I recieve a FlowApplication error email that indicates version 19 of that same flow causing an issue - a new required field does not have a value set. The reason I am deploying this new flow version is to set a value in that required field, which is also being introduced in this same change set. Version 19 is the current active version of that flow in the destination sandbox.
"Flow Details
Flow Name: Create_Journals
Type: Autolaunched Flow
Version: 19
Status: Active"

I can't figure out why the apex test classes would be using the latest active version in the sandbox when a newer version is included in the incoming change set, especially when the field being referenced in the error is a new field that is being created through the deployment of this incoming change set
I am working on an org that has an old VF + Tabs community along with a customized CommunitiesSelfRegController Apex class for self registration. In the Administration workspace, the default self-registration page is specified and the Account field is blank. This Apex class has been customized so that the account that the new user is associated with is determined by the email address the new user registered with.  I created a new Napili template community that uses the default self registration page, and this default page looks just like the old VF +Tabs community default self registration page. When I use the default page with the Napili community, it is able to use the same customized CommunitiesSelfRegController Apex class for self registration successfully. However, when I change the new Napili template community to use the Community Builder Page SelfRegister, I get an email sent to me indicating that the account is not specified. So, it appears that the customized CommunitiesSelfRegController Apex class is no longer being used since that code specifies which account to use. Do you have any ideas abuot how to get the SelfReg page to use the customized CommunitiesSelfRegController Apex class to get the account for the user?
Hello All,

I have one more class to take to get an "Internet Programming & Development" certification from the University of California Santa Cruz, Silicon Valley Extension. I can either take "Developing Java and Java EE Applications with Spring Framework and Hibernate" or "JavaScript and AJAX, Comprehensive". I have already taken the prerequisites for these classes "Introduction to Web Programming: JavaScript and PHP", "Java Programming for Beginners," and "Java Programming, Comprehensive". Once I complete this UCSC Extension certification, I will start working on Trailhead to learn Salesforce development . Which class, the Java EE or the JavaScript/AJAX class, would better prepare me for getting started with Salesforce development and eventually getting a "Salesforce Certified Platform Developer I" certification?
Hi I am Sales Force student , working on week 3 assignment. I have started on Entitlement Management. I followed all the steps for housekeeping. 
Created the New Entitlement Template also. But when I try creating a new product , I am not able to see the Entitlement Template option in the Details. 
I did add the related list Entitlement Template Name in the Product Page Layout. When I previewed, the Entitlement option was visible. 
Please help
Hi, I'm using the Analytics Studio app for the "Extract External Data into Analytics" Trailblazer course and received an error during the "digest node" process - it suggests reaching out to support for assistance. Here is the reason for failure reference: Something went wrong while executing the digest node: Internal Error. Contact support. (02K1N000000DyDfUAK_03C1N0000019VdZUAU). Please help! :) Thanks!
I am trying to create a live Quip App usign the trailhead instructions in "Quick Start: Quip Live Apps". I have node and npm compatible versions installed.

I am getting error while executing this line on Command Prompt
.\bin\quip-apps init “J1 quip app” $QeEAjACfHeh

This is the error - '.\bin\quip-apps' is not recognized as an internal or external command, operable program or batch file.

Has anybody come across how to fix this error ?
Getting error message while trying to complete Trailhead challenge

Action failed: c:AccountMap$controller$accountsLoaded [Cannot read property 'length' of undefined]
Callback failed: apex://AccountController/ACTION$findAll
Failing descriptor: {c:AccountMap$controller$accountsLoaded}

Also when trying to save the challenge error message:
The AccountMap component does not handle the 'AccountSelected' event.

Need Assistance
Hello, I have a change set with an active flow definition included. The flow is called "Create Journals" and it is on version 27 from my Development sandbox.
change set with Flow

When attempted to deploy this change set into another sandbox, I recieve a FlowApplication error email that indicates version 19 of that same flow causing an issue - a new required field does not have a value set. The reason I am deploying this new flow version is to set a value in that required field, which is also being introduced in this same change set. Version 19 is the current active version of that flow in the destination sandbox.
"Flow Details
Flow Name: Create_Journals
Type: Autolaunched Flow
Version: 19
Status: Active"

I can't figure out why the apex test classes would be using the latest active version in the sandbox when a newer version is included in the incoming change set, especially when the field being referenced in the error is a new field that is being created through the deployment of this incoming change set
Hi, I cannot add the entitlement template to a product. The error said it could not find the template but I am sure the template is already active and have already completed all necessary steps, including housekeeping, customize the page layout etc....Please advise. Thanks.
Hi I have a flow where i created a collection variable and assigned values to it by running loop and i want to use that collection variable basically the ID of that variable in a dynamic record choice screen 


i don't know i explained it clearly but can you suggest me any solution 
Hi all,

I am running into an issue that does not seem to have answer in the documentation or elsewhere.

When trying to submit using the Contact Support lightning component, the user recieves the error" Oops, something went wrong. Please refresh the page and try again". Refreshing does not fix this issue.

I have verified that the Guest User is the only user with this issue (not logged in). When I log in to the community, I have no issues.

I have verified that the guest user profle has read, create access to Cases. I have assigned a record type and page layout for this record. I have created a Global Action specific to this community and given them access. This issue still persists.

Screenshots below of the issue and configuration.
User-added image

User-added image

User-added image


User-added image

 
I'm passing this challenge, however when I actually test it out by clicking on an account in the account list item, I get this exception: 

"Something has gone wrong. Action failed: c$AccountMap$controller$accountSelected [TypeError: Cannot read property 'reuseTiles' of undefined] Failing descriptor: {c$AccountMap$controller$accountSelected}."

I did some debugging and found that the location and latitude of the account are indeed being capture by my event, so it looks like this might be a problem with the leaflet function map.panTo(). Does anyone know the solution to this issue? Here's my code, although it's exactly the same as the tutorial's.
 
({
    jsLoaded: function(component, event, helper) {

        setTimeout(function() {
            var map = L.map('map', {zoomControl: false}).setView([37.784173, -122.401557], 14);
            L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
                {
                    attribution: 'Tiles © Esri'
                }).addTo(map);
            component.set("v.map", map);
        });
    },

    accountsLoaded: function(component, event, helper) {

        // Add markers
        var map = component.get('v.map');
        var accounts = event.getParam('accounts');
        for (var i=0; i<accounts.length; i++) {
            var account = accounts[i];
            var latLng = [account.Location__Latitude__s, account.Location__Longitude__s];
            L.marker(latLng, {account: account}).addTo(map);
        }  
    },

    accountSelected: function(component, event, helper) {
        // Center the map on the account selected in the list
        var map = component.get('v.map');
        var account = event.getParam("account");
        alert(account.Location__Latitude__s + ', ' + account.Location__Longitude__s);
        map.panTo([account.Location__Latitude__s, account.Location__Longitude__s]);
    }
})

 
I am on the last step of the Trailhead Account Geolocation project and I get the following error:
User-added image

Here is the code from the AccountMapController-- What did I do wrong?
({
      jsLoaded: function(component, event, helper) {

         setTimeout(function() {
            var map = L.map('map', {zoomControl: false})
                        .setView([37.784173, -122.401557], 14);
            L.tileLayer(
         'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
              {
                 attribution: 'Tiles © Esri'
              }).addTo(map);
            component.set("v.map", map);
         });
      },

      accountsLoaded: function(component, event, helper) {

         // Add markers
         var map = component.get('v.map');
         var accounts = event.getParam('accounts');
         for (var i=0; i<accounts.length; i++) {
              var account = accounts[i];
              var latLng = [account.Location__Latitude__s, account.Location__Longitude__s];
              L.marker(latLng, {account: account}).addTo(map).on('click', function(event) {
   helper.navigateToDetailsView(event.target.options.account.Id);
});

      accountSelected: function(component, event, helper) {
         // Center the map on the account selected in the list
         var map = component.get('v.map');
         var account = event.getParam("account");
         map.panTo([account.Location__Latitude__s, account.Location__Longitude__s]);
      }
})
Hi Experts,

I followed all the instructions on how to create a LinkedIn authentication with OAuth 2.0 (https://developer.linkedin.com/docs/oauth2), but still I couldn't get it working.
I am getting this error when I try to login to my user community via LinkedIn login: 
"We can’t log you in because of the following error. For more information, contact your Salesforce administrator.
No_Oauth_State: State was not valid
"

Test-Only Initialization URL works fine.

Do you have any idea what could be wrong in my configuration?

Best regards,
Huda

Here are my settings:
User-added image

User-added image
 
i am trying to build a lightning component that shows nearby contacts based on the users current location. i am getting an error when trying to access the users current location through navigator.geoLocation. I get the following error.
"Uncaught error in actionCallback : navigator.geoLocation is undefined"

Here is my component and its controller logic.

Component:
<aura:component >
    
   <aura:attribute name="latitude" type="Decimal"/>
    <aura:attribute name="longitude" type="Decimal"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
  
</aura:component>
Controller:
({
	doInit : function(component, event, helper) {
        if(navigator.geoLocation){
            console.log("capability is there");
            
        }else{
            console.log("No Capability");
        }
        navigator.geoLocation.getCurrentPosition(function(position){
            this.latitude=component.set("v.latitude",position.coords.latitude);
            this.longitude=component.set("v.longitude", position.coords.longitude);
            console.log("Latitude is:"+this.latitude);
            console.log("Longitude is:" +this.longitude);
        });
		
	}
})
debugging  console log shows that my else part is only written to console. does that mean that geolocation is not supported in lightning? Am i doing anything wrong ? Any help would be appreciated.
 

I'm just getting started with flow, but I'm very experienced with Apex and VisualForce so many concepts are familiar to me. However, I'm having trouble understanding how cross-object field references (https://help.salesforce.com/HTViewHelpDoc?id=vpm_designer_crossobject_reference.htm&language=en_US) are supposed to work.

Problem
How do I use cross-object references in screens or conditions?

If I use a cross object reference in a screen such as {!order.Customer__r.Name}, I don't see anything. If I try and query a field like Customer__r.Name in a Fast Lookup, validation fails and the name gets erased. Likewise, if I try to use something like {!order.Customer__r.Name} in a decision, validation fails and that reference is erased.

Scenario
I have a custom object called Order__c with a lookup called Customer__c which points to an Account. In other words, Order__r.Customer__c is an Account Id.

What's the easiest way to display a screen with the order name and the customer's name?

What I tried
1. Create a Fast Lookup to get the Order__c that assigns to a variable called order and fetches the order's Name. If I try to add Customer__r.Name to fields, the value doesn't validate and gets erased. Therefore, I just query Customer__c (an account Id) as the help article seems to imply I need to do.
2. I create a screen and try to reference {!order.Customer__r.Name} and I see nothing. The article seems to imply that Salesforce might magically query the needed but missing info, but that doesn't seem to work.

Of course, I can do another fast lookup to query an Account query Account.Id = order.Customer__c and assign that to a variable named customer, the access {!customer.Name}. However, I'm trying to figure out how cross-object references work in flow to hopefully simplify things.

Questions
1. What am I doing wrong?
2. Should cross-object references result in some data being queried automatically? How is the cross-object data supposed to come in?
3. Can you use cross-object references with related children / lists in addition to lookups?

I fully understand how to add additional fast lookups to my flows to get the necessary data and I'm try just trying to see if there's some cross-object reference magic that can take a few explicit steps out.

Thanks!

  • April 24, 2015
  • Like
  • 0
Hello guys am new to salesforce.
Is there a way to convert address into latitiude and londitude.

Does anyone know the maximum number of characters that a SFDC variable
name can have?

Posting this in order to help others who, months from now, might Google "OP_WITH_INVALID_USER_TYPE_EXCEPTION" and find this explanation.

 

We wrote an Apex trigger on the User object, to insert a custom object record anytime a user updates their Chatter status.  This was done to fulfill a client's requirement to audit all Chatter activity.

 

The trigger worked fine, until one day the client signed up some Chatter Free users.  When such a user tried to update their status, they got a pop-up with an OP_WITH_INVALID_USER_TYPE_EXCEPTION error.

 

We scratched our collective heads for awhile.  After all, Apex triggers run in "system mode," right?  That is supposed to mean that "object and field-level permissions of the current user are ignored."  And yet this trigger seemed like it was running in "user mode," enforcing restrictions based on who the current user was.

 

The root cause turned out to be that a Chatter Free user cannot be the owner of a custom object record, and SFDC by default sets the current user as a new record's first owner.  We discovered this when we realized, via experiment, that Apex triggers fired as the result of actions by Chatter Free users could definitely update an existing record, but were having problems creating records.

 

So the simple solution was to explicitly set the owner of the new record to some fully-licensed user prior to inserting it.

Is it possible to determine whether the current user has delete permissions (aka Full Access) for a particular record (custom object), without actually attempting to delete the record?

I'm creating some custom actions using VF/apex, and for some of them I want to limit who can perform the action to the same users who can delete the record.  The action does not involve deleting the record, but I want it to be more restrictive than who can perform an edit.

I looked into the sharing table (object_share) but that only lists the owner as Full Access.  Since anyone above the owner in the role hierarchy also has full access, and the hierarchy might be several levels tall, it seems like a tall order for my code to walk the entire hierarchy and determine if that applies.  Is there an easier way?

Thanks much!
  • August 04, 2008
  • Like
  • 0
We want to add non-Salesforce users into the Users table as Inactive users so that we have a complete list of people in the company in a single location.

We also have some custom fields that have lookups to the user table. However, the lookups only show Active users. Is there a way to make this lookup show Inactive users as well? Or will this require making a custom object called "Employees" or something like that and mimicing the User list?
  • December 29, 2005
  • Like
  • 0
The Challenge is missing for the above module.  I've refreshed the window several times and logged out of Trailhead, still no Challenge.

I saw another post today, Nov 3rd,  in a different thread with this problem.

Posting this in order to help others who, months from now, might Google "OP_WITH_INVALID_USER_TYPE_EXCEPTION" and find this explanation.

 

We wrote an Apex trigger on the User object, to insert a custom object record anytime a user updates their Chatter status.  This was done to fulfill a client's requirement to audit all Chatter activity.

 

The trigger worked fine, until one day the client signed up some Chatter Free users.  When such a user tried to update their status, they got a pop-up with an OP_WITH_INVALID_USER_TYPE_EXCEPTION error.

 

We scratched our collective heads for awhile.  After all, Apex triggers run in "system mode," right?  That is supposed to mean that "object and field-level permissions of the current user are ignored."  And yet this trigger seemed like it was running in "user mode," enforcing restrictions based on who the current user was.

 

The root cause turned out to be that a Chatter Free user cannot be the owner of a custom object record, and SFDC by default sets the current user as a new record's first owner.  We discovered this when we realized, via experiment, that Apex triggers fired as the result of actions by Chatter Free users could definitely update an existing record, but were having problems creating records.

 

So the simple solution was to explicitly set the owner of the new record to some fully-licensed user prior to inserting it.