• Base Line 7
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 1
    Replies
I would like to have a filtered version of a collection as the source data of an aura iteration. Basically, something like this:
<aura:iteration items="{! v.myList.filter(element => ....) }" var="item">
Is this possible and if not, what can I do to achieve the same? Any advice is much appreciated. Thanks.
There is a lightning input element in the body of a tab of my custom standalone app and I would like to have any values in the input element cleared once I move to another tab or any other part of the application. Since there is only an onactive but no "inactive" attribute for a tab, is there a workaround for achieving this? I considered using the onselect attribute of lightning tabset but since this tab is in a tabset which is nested in another tabset and so on, I would have to use multiple methods and attributes to accomplish the task and this does not seem efficient. Any advice or help would be greatly appreciated. 
I have a stand-alone app that makes use of a lightning tabset. On one of the tabs, there is a lightning datatable. I would like to create a refresh button that when pressed will rerender or refresh the table to display the latest data. I would like for the rerendering to only be at the table level or at most, the tab level without affecting the rest of the app. How do I go about doing this? Any advice or help is highly appreciated.
I have a custom app to which I navigate using a custom button. I would like to access a parameter from the url of the app using Javascript but I don't know how. All I have found online thus far is how to do so using Apex. Do I have to use lightning:isUrlAddressable or is there another way to go about it?
For instance, if the url is 
https://<my domain>/c/MyCustomApp.app?action=edit&myId=9
 how do I get the myId=9 part of the query using Javascript? Any help is much appreciated.
I have added a custom button to a page that should navigate to a web page (https://www.google.com) when it is clicked. However, I get an error message stating, "Page doesn't exist. Enter a valid URL and try again." Here is the code I wrote for the navigation:
 
var navigService = cmp.find("navService");

var PageReference = {
            type: 'standard__webpage',
            attributes: {
                url: 'https://www.google.com'
            }
};

navigService.navigate(PageReference);
Looking at the documentation provided by Saleforce, this should work without any problem but that does not seem to be the case. Can someone please help me to figure out why it is not working? Thanks in advance.
 
I have added a button to a page and upon clicking it, I need to navigate to an app in the org. The only information I have found so far on the net is how to navigate to a component. Do the same methods apply to an application (like using "lightning:isUrlAddressable" and pageReference etc.)? Any tips or information would be highly appreciated. Thanks.
I tried following the instructions given in the module (https://trailhead.salesforce.com/content/learn/modules/apex_integration_services/apex_integration_webservices). The code for connecting to the org using curl is as follows: 

curl -v https://login.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=<your_consumer_key>" -d "client_secret=<your_consumer_secret>" -d "username=<your_username>" -d "password=<your_password_and_security_token>" -H 'X-PrettyPrint:1'

I supplied all the credentials needed in the curl command but I keep getting this error whenever I execute the command: 

{"error":"invalid_grant","error_description":"authentication failure"}* Connection #0 to host test.salesforce.com left intact

The result in full is as follows:

*   Trying 101.53.168.24:443...
* TCP_NODELAY set
* Connected to login.salesforce.com (101.53.168.24) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: C:\curl\curl-ca-bundle.crt
  CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=salesforce.com, inc.; OU=InfraSec; CN=login.salesforce.com
*  start date: Dec 15 00:00:00 2017 GMT
*  expire date: Dec 14 12:00:00 2020 GMT
*  subjectAltName: host "login.salesforce.com" matched cert's "login.salesforce.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA
*  SSL certificate verify ok.
> POST /services/oauth2/token HTTP/1.1
> Host: login.salesforce.com
> User-Agent: curl/7.65.3
> Accept: */*
> 'X-PrettyPrint:1'
> Content-Length: 293
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 293 out of 293 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Date: Tue, 20 Aug 2019 01:17:29 GMT
< Strict-Transport-Security: max-age=31536000; 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://a.forcesslreports.com/hpkp-report/nullm";
< Expect-CT: max-age=86400; report-uri="https://a.forcesslreports.com/Expect-CT-report/nullm";
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Cache-Control: no-cache,must-revalidate,max-age=0,no-store,private
< Set-Cookie: BrowserId=kxBGP1wCQXOEUcyoQKRFoQ;Path=/;Domain=.salesforce.com;Expires=Sat, 19-Oct-2019 01:17:29 GMT;Max-Age=5184000
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-ReadOnlyMode: false
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
<
{"error":"invalid_grant","error_description":"authentication failure"}* Connection #0 to host login.salesforce.com left intact


I have tried all the suggestions I have found online including the following to no avail:
  1. Setting the connected app to have full access
  2. Setting IP restrictions to relaxed
  3. Setting users to authenticate themselves
  4. Enabling the connected app on the System Administrator profile (which is the profile I'm using)
  5. Ensuring the profile also has 'API Enabled' setting enabled.
  6. Setting Login IP ranges for profile to all possible values.
  7. Ensuring there is no space or character between password and security token
I have been unsuccessful thus far. Could someone please help me to fix this problem? Thanks in advance.
Hi. I want to code for a trigger in Apex but I want the logic to reside in a handler class and have only one statement in the trigger itself which references a static method in the handler class. Basically something like this:

trigger myTrigger on sObject (after update, after insert, after delete, after undelete){
HandlerClass.executeTriggerLogic(args[]);
}

public class HandlerClass{
public static void executeTriggerLogic (args[])
{
//trigger logic
{

//other methods...
}

Is this possible and what would I need to pass from the trigger to the Handler as the args[] to make this work? Any help would be much appreciated. Thanks.
I have added a custom button to a page that should navigate to a web page (https://www.google.com) when it is clicked. However, I get an error message stating, "Page doesn't exist. Enter a valid URL and try again." Here is the code I wrote for the navigation:
 
var navigService = cmp.find("navService");

var PageReference = {
            type: 'standard__webpage',
            attributes: {
                url: 'https://www.google.com'
            }
};

navigService.navigate(PageReference);
Looking at the documentation provided by Saleforce, this should work without any problem but that does not seem to be the case. Can someone please help me to figure out why it is not working? Thanks in advance.