trailhead | 5 puzzles | Math library
kandi X-RAY | trailhead Summary
kandi X-RAY | trailhead Summary
5 puzzles. Each gets more difficult. 5 clues. Take notes. Each puzzle is gone after it's solved. 5 places. Think numbers. Enter all answers at savethedate.foo. You must know where you've been to get where you're going.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of trailhead
trailhead Key Features
trailhead Examples and Code Snippets
Community Discussions
Trending Discussions on trailhead
QUESTION
I am learning Salesforce Apex development by taking a trailhead tutorial.
Tutorial: Find and Fix Bugs with Apex Replay Debugger
I followed the tutorial along and got the following error when I try to call "SFDX: Run Apex Tests" in Visual Studio Code.
Command 'SFDX: Run Apex Tests' resulted in an error (command 'sfdx.force.apex.test.run' not found)
I am able to run the tests in a terminal by the way.
Does anyone know how to fix this error?
Thanks in advance.
Added on 2021/11/30
I wonder if it has anything to do with the M1 chip.
My environment:
- MacBook Pro (13-inch, M1, 2020)
- macOS Big Sur
ANSWER
Answered 2022-Mar-01 at 08:20Let me answer my own question.
Everything works fine after I added Java home setting in setting.json of VS Code.
"salesforcedx-vscode-apex.java.home": "/opt/homebrew/Cellar/openjdk@11/11.0.12/libexec/openjdk.jdk/Contents/Home",
QUESTION
On trailhead Salesforce today saw a Salesforce Sandbox Seeding tool to propagate (targeted) data to lower environments with some clicks, my question is it really helpful? , i saw Salesforce was pushing in this direction for migrating data from current company org to the new org.. but won't it make companies to enter into a licensed product agreement if it’s a one time thing.
Also Would this empower devs or help with automated testing in lower environments?Your honest responses are highly appreciated
Here is the link of product https://www.ownbackup.com/products-sandbox-seeding/
Regards, Carolyn
...ANSWER
Answered 2021-Jun-23 at 22:55Out of the box you get something to copy over data to full copy and partial copy sandboxes. It'd be exact copy, you'd then have to run a script to anonymise the data, break email addresses on contacts, leads etc (yes, there's way to run Apex class as part of refresh, it's called "PostCopy").
The good bits
There's https://www.salesforce.com/products/platform/features/data-mask/, list price is 10% of your SF net spend (link). Bit expensive but all on the platform? And supposed to work also in dev / dev pro?
There are OwnBackup, Odaseva, Gearset etc offerings (I'm not affiliated with either) but it's bit of a package deal. The focus is on deployment automation, backup & restore and sandbox seeding is kind of side effect. Are you ready to abandon changesets? Do you have production backup & restore strategy in place? Tested?
The bad bits
If you go with anything other than Data Mask - expect you'll have to put some effort in. There's no silver bullet. If you have validation rule "you can't create Opportunities with Close Date in the past" - you're screwed. They will not load OK. Whether it's a seeding scenario or restore from backup. You'd need to identify these and put some bypasses in them (like "don't run if I have Custom Permission called "backup" and you'd then assign / unassign a permission set with it. Because it's bad idea to "don't run if I'm sysadmin", in the long run these backfire). Similarly you might have to:
- skip certain apex triggers.
- make a mini deployment to disable duplicate rules (how good will your email anonymisation be, eh?)
- disable field history tracking during cleanup (congratulations on masking this contact's email with some rubbish, shame the old and new value is still visible in field history)
- or activate "set audit fields" if you need to write original
CreatedDate
fields.
So... if we accept the fact there's some level of work needed... sfdx
tool can assign permission sets. Can run deployments. Can create sandboxes, load data from CSV or even JSON files (great for parent-child like Account+Contacts). There's even this sfdx plugin which takes a while to master but it's absolutely awesome: http://help.sfdmu.com/ It all can run from commandline so you click a script and your new environment is ready 5 min later.
So where would you draw a line? How much you're willing to pay for OwnBackup vs doing it yourself. Yes, it's work but you'll have to do a bit of it either way. By all means chat with sales reps, evaluate products... but it'll have to suit your needs and at the end of the day only you know which trigger / integration / email alert has to be turned off or else it'll spam finance system with test data...
QUESTION
I've been struggling a lot trying to complete this trailhead module. The first issue was while trying to log in with GitHub creds, which I solved using the GitHub-token flag.
Now, after I Kick-off Continuous Integration, it keeps failing over and over again.
The first exception was iv undefined, which is no longer happening, not sure how it got fixed. And this
:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c
the last exception has become a real blocker. I can't figure out how to work around this.
Job Log:
Config File:
...ANSWER
Answered 2021-Feb-13 at 16:40Finally, I was able to solve it.
The reasons why this was failing:
- Trailhead module information about login is out of date, travis login --org was not working- keep throwing "Not found" exception, so I solved it using travis login --org --github-token.
- When using
travis encrypt-file path-to-secret-file/secret-file.txt path-to-secret-file/secret-file.txt.enc --add
I wasn't providing the endpoint, in this case since I was logged to the Org end-point I needed to specify the same in the command by adding--org
at the end. - Since Travis-org is moving soon to Travis-com, and Travis-org only fetches public repositories, I needed to move this to Travis-com, so I logged out and logged in again but this time pointing to --com in both commands (login and encrypt-file).
Taking these 3 considerations I was able (finally) to make it work.
Is pretty bad not having this information accessible.
Only information that gave me an idea of what probably was happening was this banner.
Basically nothing.
QUESTION
I'm trying to create a dropdown menu for one of the items in my nav bar. I based the code on this W3Schools example. Upon hover, the menu appears below the nav bar (as it should be) but it is 1) stacked horizontally rather than vertically and 2) appears to the far right on the page. I've look at similar questions here but haven't been able to figure out the problem in my code. Any help would be appreciated.
...ANSWER
Answered 2020-Nov-28 at 02:43Your dropdown is structured of anchors (links, tags), which naturally are inline elements. That means that naturally these elements are located as part of page or line flow. To make them appear vertical, you need to change them to be "block" elements, which you use by adding
display: block
to the styling on the dropdown a
elements:
QUESTION
Hi Salesforce developers,
I am exporting standard Contact fields with Salesforce SOQL. I need to import it to other tool but I need to convert LastModifiedDate, which is ISO datetime string, into Unix timestamp seconds from 1/1/1970.
...ANSWER
Answered 2020-Nov-12 at 11:54Can you make a new formula field (type = number) with something like (LastModifiedDate - DATETIMEVALUE('1970-01-01 00:00:00')) * 24 * 60 * 60
. And SELECT LastModifiedTimestamp__c...
or however you'd call it.
I don't remember if it does seconds or milliseconds, you might have to multiply by 1000. Bit wasteful to have a field just for that but well, what you can do.
QUESTION
i'm doing a tutorial on standardController, but im having weid empty results for accounts, with the preview button:
...ANSWER
Answered 2020-Nov-08 at 18:26StandardSetController by default displays the listview you selected last. If you have a listview with stupid conditions or it's "Recently Viewed" and you haven't clicked any recently - yep, that's what happens, empty list.
- Change the listview to all accounts and reload your page.
- Or call
ssc.setFilterId()
in constructor to force a specific listview. (I see you have pure visualforce so far, no Apex) - I think you can achieve same effect if you pass in the URL
&fcf=listviewidhere
, similar to how listviews work in Classic. It's been a while though and it's not an official method, you should use setFilterId - Or build the StandardSetController based on results of exactly the query you want. (combine this with
\[SELECT...\].getQuery()
)
QUESTION
I'm trying to build a simple component to display a web page inside a Lightning component. This is my starting code.
...ANSWER
Answered 2020-Aug-18 at 18:41It's not you, it's them. The hint is in "{target} refused to connect". I don't know what you did to your Chrome error console but the error should be in there.
Refused to frame 'https://trailhead.salesforce.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".
https://en.wikipedia.org/wiki/Content_Security_Policy
that trailhead page doesn't allow to be embedded anywhere else, not even on pages from same subdomain. Your component will work fine if you use src="https://example.com"
. Generally you'd need to talk with the target website's owner to whitelist your SF (internal mydomain and/or community, depends what exactly you want to do with it)
QUESTION
My component works fine and I can see it is working properly with the maps being formed in UI and markers coming up properly, however I am still get this error for the challenge :
Challenge Not yet complete... here's what's wrong: We can't find the correct settings for the createMapMarkers() function in the component boatsNearMe JavaScript file. Make sure the component was created according to the requirements, including the right mapMarkers, title, Latitude (Geolocation__Latitude__s), Longitude (Geolocation__Longitude__s), the correct constants, stopping the loading spinner, and using the proper case-sensitivity and consistent quotation.
This is the Challenge 7 Statement as per the trailhead:
"Build the component boatsNearMe and display boats near you Create the component boatsNearMe and show boats that are near the user, using the browser location and boat type. Display them on a map, always with the consent of the user (and only while the page is open)." https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_lwc_specialist
Here is my boatsNearMe LWC code
...ANSWER
Answered 2020-Aug-28 at 20:48I think you have Geolocation__Latitude__s
twice in this part:
QUESTION
I am having trouble solving the Challenge 7 I have the required imports as well as required functions in the JS file. Still #Trailhead giving error:
We can’t find the getLocationFromBrowser() function in the component boatsNearMe controller. Make sure the component was created according to the requirements, including the use of 'getCurrentPosition()' to get the navigator’s geolocation, the arrow notation with 'position =>', getting the coordinates from the position, and assigning them to the controller’s properties 'latitude' and 'longitude, using the proper case sensitivity.
Please find my code here:
...ANSWER
Answered 2020-Jun-28 at 22:29The verification code is extremely picky. If you remove the parentheses around the word position, I think it will work.
QUESTION
Hope you are well and doing well in these times,Below is a common scenario to take some set of sObject records, execute some processing such as making a callout to an external REST endpoint or perform some calculations and then update them in the database asynchronously. . The following code takes a collection of Account records, sets the parentId for each record, and then updates the records in the database.
My questions are:-
A) Why i need to set the parentId for each record for Queueable Apex?
B) Why i cant use public identifier (mind you i know differences between public and private identifier :)) but why here we used private in Queueable Apex and then we have to set the values?
ANSWER
Answered 2020-Apr-15 at 07:45Setting of a parent ID is an example of a task that can be done asynchronously. This is a somewhat poorly chosen example because the same task could be done synchronously without Queuable. (If there are a lot of Account records being updated then moving this task to async might be a good idea).
Public versus private - making a field private is a best practice as a way of encapsulating data in a class. It is used to hide the values or state of a structured data object inside a class, thus preventing direct access to them. In case of a Queuable, this is kinda like a utility class that will be used in a very specific context so you could make the variables public and remove the constructor.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install trailhead
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page