8

On inspection I saw that the POD (instance) on which my scratch orgs exist had been upgraded to Spring '20 on Saturday. The only solution I could find was to delete my scratch orgs and re-create them using the original aliases. Having done this the problem went away. I guess Spring '20 doesn't play nice with Winter '20 scratch orgs.


7

The Namespace Registry Connected App is the Connected App under which your Dev Hub authorizes to your packaging org. Completing this linkage allows your Dev Hub to spin up namespaced scratch orgs using the namespace owned by the packaging org. If you don't use namespaced scratch orgs, you don't need to connect the namespace registry. You shouldn't try to ...


5

This is part of the critical update documented here https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_apex_publicConstructorsInMgdPackages.htm?edition=&impact= Specifically "Apex classes contained in second-generation packages can instantiate public classes from other packages in the same namespace only if they are annotated @...


4

You should be able to do this through a metadata deployment. If you have a test environment, you can try this out to see if it works. In API version 44.0 and later, you can do this all through the Flow metadata type (no need for FlowDefinition). https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_visual_workflow.htm You'll want to ...


4

abc is an array, not a map. You cannot use get to get value in array of object. You have to use Array.find var staticKeyElement = this.abc.find(ele => ele.key === 'Static__c'); console.log(staticKeyElement.value); Sample Playground link : https://developer.salesforce.com/docs/component-library/tools/playground/K_PlRylL/1/edit


4

https://developer.salesforce.com/tools/vscode/en/apex/refactoring It's actually hard to see in the .gif they provided in the link (tried to screengrab the moment and included above), but you have to highlight the whole word you're looking to rename as opposed to simply clicking your cursor on it. Once you've highlighted the name in question, you can simply ...


4

This seems to be a bug at this point https://github.com/forcedotcom/cli/issues/260 From the Twitter conversations with PM, he is aware of it and they are working on it to fix it asap. Current workaround is sign up for a prerelease org and then enable devhub and use that to create spring 20 scratch orgs. Update Update from PM that this has been fixed now!...


4

You can use force:alias:set: sfdx force:alias:set newAlias=username@domain.com The original alias is automatically removed/renamed with this command.


4

This issue is due to Spring '20 and can happen with new scratch orgs too. Not all sandbox pods are affected. The event emitter warning has nothing to do with the actual problem. The underline issue is a redirect from https://..my.salesforce.com to https://.my.salesforce.com. When redirecting to a different host, authorization headers are removed which ...


3

You need to ensure that your scratch org definition file both uses the correct configuration for a scratch org that includes the features required by your code: "features": ["StateAndCountryPicklist"], and is properly specified at the time of package version creation: sfdx force:package:version:create --package "MyApp" --definitionfile config/project-...


3

I had similar idea or annoyance in past with storing local project to cloud, after using git version control things are much simpler and this approach is recommended. Not only GIT allows you to work on multiple computer but also with a team. Basic version of popular source control like Github/Gitlabs/Bitbucket is free. Continuous auto sync with google ...


3

Setup --> Session Settings --> Turn off "Enable secure and persistent browser caching to improve performance" As the Salesforce Docs mention: This'll allow you to avoid having to clear the cache and do a hard reload to see code changes. I make sure to always check this setting off in development orgs. Just make sure not to do so in production.


3

I realised there is a typing error. The runtimeNamespace tag is not closed correctly, I missed the "/"


3

As far as I've observed (custom settings, platform events, normal custom objects, standard objects, and custom metadata), the fields are always in the fields directory, with the name <field-name>.field-meta.xml. This is simply confusing documentation.


3

Playground does not support components like lightning-record-edit-form or any other base components that requires a Salesforce connection. You will need to use an IDE like vscode extension for Salesforce and Salesforce CLI to connect your local machine to actual Salesforce org to verify and play with components that require Salesforce UI API or Salesforce ...


3

In the following document youll find some common scenarios which might help - https://sfdc-db-gmail.github.io/unlocked-packages/faq-unlocked-pkgs.html#specify-pkg-dep When declaring dependencies you should match between your package aliases. "dependencies": [ { "package": "yourManagedPackageAlias" }, ...


2

You've got a lot of errors in your code. Without changing your Apex at all, here's what your JavaScript should look like: import { LightningElement } from 'lwc'; import createTransaction from '@salesforce/apex/MyClass.createTransaction'; export default class MyComponentName extends LightningElement { onButtonClick() { const msg = { ...


2

2 things, You have written method name as createTransaction in apex where as you are importing test method. You have to import proper method. import createTransaction from '@salesforce/apex/MyClass.createTransaction'; Secondly, the parameter name in apex and in lwc should match. In Apex the variable name is req where in your js you have used request , ...


2

CumulusCI executes commands against the org whose name you specify with --org. If that org does not yet exist, CumulusCI creates an empty org and executes the command against it. Before running tests, whether Robot or Apex, with CumulusCI, you'll typically build the org using a flow, such as dev_org, qa_org, or install_beta. Those flows push your project's ...


2

This syntax was what I needed sfdx force:source:retrieve -m CustomField:Claim.CveClaim__c to retrieve my custom field CveClaim__c that I added to the (standard in FSC object) Claim. The -m CustomObject:Account will pull back all the fields of that object - standard and custom.


2

There is some coding involved to get this running but you shouldn't need to start from scratch. You'll need to update your columns array so that at least one column is sortable ("sortable": true), then set the sortedBy attribute on your datatable with the name of the column that the table is sorted by when the component loads. From the lightning-datatable ...


2

sfdx force:org:create takes the -v argument (not -u) to specify a Dev Hub. I suspect that your default Dev Hub has hit its limit, while others may or may not have, but your scratch org requests aren't being routed where you intend them to. Check which Dev Hub is default by running sfdx force:org:list (it has the (D) annotation), and ensure that you use the ...


2

What's your unlocked package use-case? Are you using them to organise code within a large org? As a way of distributing code to many orgs? Something else? As it stands, I would say that Sites are best left to the target org, not to be part of the unlocked package. Otherwise, things that you might legitimately want to change in production (e.g. the Site ...


2

You need to edit your package.xml file. To download all custom objects: <types> <members>*</members> <name>CustomObject</name> </types> My understanding is that standard objects and managed package objects need to be defined specifically: <types> <members>pse__Assignment__c</members> &...


2

Scratch orgs are intended to be disposable: you create an org, populate it with your metadata, do work in it, capture any work you wish to persist, and then destroy the org. Scratch orgs generally should not be used persistently, and in particular this is likely to cause problems in a CI context where you may be running builds on radically different ...


2

All the metadata files that represent your org (as best it can) is the "truth". You'd really want to use "all" in this case to call it the representation of your og. When you put that in one accessible location, it becomes the single source of truth. Git is just a version control system (VCS). It's used to track changes in any set of files. To reiterate, ...


2

Source commands reference You're very close. You just need to add a : in between CustomObject and your objectAPIName with the -m parameter. Also, make sure that you're using the correct org alias name or your username. sfdx force:source:retrieve -m CustomObject:Animal__c -u aliasOfOrg To troubleshoot similar issues going forward, you can always utilize --...


1

Your string is not correctly escaped. You can observe this by running String resp3 = '{"id1":"10","clueContent":"[{\"test\":\"13245678912\"}]"}'; System.debug(resp3); You'll see 11:55:20:003 USER_DEBUG [2]|DEBUG|{"id1":"10","clueContent":"[{"test":"13245678912"}]"} Note the absent backslashes. This is not valid JSON. In Apex string literals, you must ...


1

Scratch Orgs are like Sandboxes. Any installed packages have unlimited licenses, so there won't be any licenses listed. However, you should still be able to assign the permission set via force:user:permset:assign.


1

As linked in the documentation, the relevant Metadata API entity is Prompt. The Metadata API's documentation includes a complete sample package.xml manifest: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>*</members> <name>Prompt</...


Only top voted, non community-wiki answers of a minimum length are eligible