Hot answers tagged

52

There are ways to surface the namespace itself from within Apex (doesn't help us in JavaScript, yet). Deriving the namespace prefix itself: String rawPrefix = MyClass.class.getName().substringBefore('MyClass').substringBefore('.'); //this gives '' in any development org //and gives 'ns' in the packaging org Getting a single token which can be used to ...


27

Thanks for the question! I've created an answer in three parts, each one meant to address a specific question you've asked. PART ONE: How to Create Second-Generation Extension Packages PART TWO: How to Get the LMA to "see" a Second-Generation Managed Package PART THREE: Technical Enablement for Second-Generation Extension Packages Not gonna lie, ...


19

Here are some "advantages" vs using a Custom Object: Can be Deployed Can use Field Definition or Entity Particle to create references to Custom Object Metadata Retrieve doesn't cost against SOQL limits (unless it contains long text) Can be referenced in formula fields Unit Testing isn't too bad as well as the code is well composed. Because they ...


17

I would strongly suggest reading this recent post by Dan Appleman. He outlines the various ways in which factors like sharing and CRUD/FLS play into security, and ends with the comment, which tells me you can pass security review with classes not marked as sharing so long that is clear to the users administering the system which uses that construct: But ...


16

A reason I haven't seen articulated yet applies specifically to the managed package context: Packaged, protected Custom Metadata Types are an ideal solution for secret storage in a managed package context. While Protected Custom Objects and Protected Custom Settings can also offer secret storage, only Custom Metadata Types allow those secrets to be packaged ...


14

Source: http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_querying_currency_fields.htm 1) Sum() calculates different currencies correctly. 2) The result of Sum() uses the Corporate Currency of your org. 3) No, you have to set the CurrencyIsoCode to your Corporate Currency CurrencyIsoCode manually. You can test that by ...


14

TLDR: No, Unlocked Packages cannot be used like this. Anyone commercially distributing a Salesforce app must do so using Managed Packages. Also, Managed Packages offer many valuable features simply not available in Unlocked Packages. This is a great question, Robert! Thank you for asking it. I'll do my best to answer both parts of this question: Can ...


12

Summary The next generation of packaging is still very much a work in progress. The core focus is embracing the source control driven approach of DX into how we develop and distribute packages. The current road map shows that the first GA release is until Summer 2018: Moreover, this schedule is really about migrating existing packages to use ...


11

This feature is going to go into pilot in Winter or Spring '15. Note this idea being "Under Consideration" https://success.salesforce.com/ideaView?id=08730000000BrBKAA0.


11

You should be able to sign up for a partner community using your dev org login credentials where you have built the package . https://partnersignup.salesforce.com/partnerLogin You will get access to publishing console once you are in partner community that should help you to publish and manage your listing . You will need an email other than Gmail ...


11

There is the possibility of installing the package using Metadata API. Then inspect the company details, package version description or documentation (etc) for meaningful contact information. For example using JavaScript in browser console: var versionNumber = '1.0'; var activateRSS = 'false'; var nsPrefix = 'MyCompanyName'; var binding = new ...


11

Roughly speaking, this is what Queueables are for. Once Transaction Finalizers are GA, I think they'll be a pretty good solution for this. There are many concerns, though: The Queues If you're starting batches from a trigger, you can overwhelm the flex queue pretty quickly. If you're starting Queueables, you can degrade the performance of other async ...


10

You can use System.requestVersion, which returns the version of your package. See Version for more details, but I'll also include the snippet from there here: if (System.requestVersion() == new Version(1,0)) { // Do something } if ((System.requestVersion().major() == 1) && (System.requestVersion().minor() > 0) && (System....


9

We just got this answer from Salesforce.com Support regarding our related case. There is this knowledge article for this kind of problem Removing Obsolete Visualforce from Managed Packages Eric Adding to the answer If you have already deleted and packaged up the changes to a new package you will need to follow the below steps to upgrade users to the new ...


9

In this case, targetConfigs is an optional tag. it is upon you, weather you want to restrict the component to be used on some particular object record page. If you don't want, simply remove the below part of the code:- <targetConfigs> <targetConfig targets="lightning__RecordPage"> <objects> <...


9

Cross namespace import and communication is currently restricted because of a security limitation in LWC. With our current Lightning Locker architecture there just isn’t a secure way to enable it. The good news is that UI Security team is actively working on a new architecture that will enable secure namespace import and communication. It isn’t a small ...


8

You do not need to rewrite the code to eliminate scanner false positives -- there will always be false positives. However, if you want to rewrite the code, then you can replace a boolean with a text literal and then cast to a Bool. <script> var foo = Boolean('{!JSENCODE(IF(MyObject__c.chk_CheckboxField__c,"true", "false"))}'); //absurd way to quiet ...


8

Great observations. I've encountered these are two variations: someone who logs into the AppExchange and clicks Get It Now will have: lead source SFDC IN|PackageName appropriate campaign membership a Trial license created someone who holds the package install link (eg by copying it out of the URL) will get: lead source Package Install no campaign ...


8

You can join the partner program as an individual ISV partner and list free apps on the app exchange (managed or unmanaged) at no cost (I've done so!). However, you'll need to be fairly persistent with folks at SFDC to keep your stuff moving, they seem to forget about the small players sometimes.


8

For Finding vulnerabilities in the API only application(does not have a web app and you have access to only its REST API), you can configure proxies in the Postman and execute OAuth and other REST api invocations and network requests goes through same proxy that ZAP is configured to intercept. If You have web app you can configure your browser as proxy so ...


7

No, there is no obligation to become an ISV partner. However, by becoming a partner, you will gain a number of benefits: Free trainings and certifications for you and your employees. Enhanced organizations available for demonstration purposes, such as a full-sized Enterprise Edition, an ISV Developer Edition (much higher storage/usage limits). Ability to be ...


7

There is no documented limit on the recursion depth possible, but there are other limits that apply to this question. Execution Time: The entire time for a transaction is 10,000ms; this time is shared. Multiple packages are likely to reach this limit sooner. Referenced Namespaces: You can reference at most 10 namespaces in a single transaction. Assuming ...


7

You can use the describeTabs method to list the current applications and determine if the selected app is the one your looking for. I created a HTML side bar component with an IFRAME containing this page, when i switch applications it updates with accordingly. <apex:page controller="MyAppController" showHeader="false" sidebar="false">{!message}</...


7

You can upload and distribute unmanaged (and even managed) packages, but you won't be able to list it "publicly." Users can still install it if they can get a link to it, for example, from your website. If you want to actually have it be searchable directly in the AppExchange, you need to get certified (i.e. pass security review), which requires being in an ...


7

Let's consider the following base scenario to answer your questions: you plan to use a contrib:parentComp component. contrib:parentComp has a child component contrib:childComp. contrib:childComp has 3 attributes globalAttr, publicAttr and privateAttr with the 'hinted' access levels. the contrib namespace does not belong to your org. your org has your own ...


7

Probably a good question for Partner Success. But I know myself and other ISVs I talked to were put off by the cost - it was pretty expensive to buy cache dedicated to my namespace since it was a per customer expense, rather than something I could just buy once for my app and distribute it with it (but that could have changed since I last inquired) It was ...


7

Something was wrong with my scratch org. After I recreate it 2 times it worked without adding any namespaces. I didn't delete my question as this might happen others and then the thread is helpful. Thanks for everybody's help!


7

Salesforce has exposed tooling api that can help you clone the Managed Package flow if it is packaged as template. Note you can wrap this tooling api via an apex class and achieve everything that API can do. To clone the flow via the api follow the below steps. PREREQUSITE : Note that for experiment i have installed a flow package here from appexchange that ...


7

Auth Provider is org specific. It has a callback URL where a connected app redirects after authentication and org get authcode and complete the rest authentication steps. If salesforce allows Auth Provider to be packaged then redirect url will be same (same as packaging org) for all the subscriber orgs and it will redirect incorrectly to packaging org ...


6

RE: 1. How does the licensing works force.com custom application? Salesforce provides a licensing engine to it's Partners called License Management Application (LMA). It is available to eligible partners (it's free to become one) and after your managed package has been security reviewed (free for free packages) they will provide you with the installation ...


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