• weno bak
  • NEWBIE
  • 2 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 14
    Replies
I have a lightning web component. I need to use it in external website. I followed the steps given in salesforce help page. I have whitelisted the website into which I need my lwc to be added, in CORS. Still on loading the website I am getting "No 'Access-Control-Allow-Origin' header is present on the requested resource". Issue is in sandbox. Any help is appreciated.
Hi All,

LWC intellisense(autocomplete) is not working in HTML file for lwc in vs code. I have all the salesforce extensions installed. Also, I have tried reinstalling both vs cdoe, CLI and extensions too. Still the same issue.
Have been using this for so long but all of sudden, I was stuck with this yesterday. Can somebody assist here.

Thanks
Kindly anyone can help on below 4 questions for PD:
thanks in advance

1. Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents.  Order records will be imported into Salesforce
How should the Order Number field be defined in Salesforce?
A. Lookup
B. Direct Lookup
C. Number with External ID – is this the correct answer?
D. Indirect Lookup

2. A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?

A. use Test.loadData() and reference a CSV file.
B. use SOQL to query the org for the required data.
C. use Test.loadData() and reference a static resource. – is this the correct answer?
D. use Anonymous Apex to create the required data.

3. Which code in a Visualforce page and/or controller might present a security vulnerability?
 A. <apex:outputField value="{!ctrl.userInput}" />

 B. <apex:outputText escape="false" value=" {!$CurrentPage.parameters.userInput}" />

 C. <apex:outputText value="{!£CurrentPage.parameters.userInput}" />   -- is this the correct answer?

 D. <apex:outputField escape="false" value="{!ctrl.userInput}" />


4. A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?
A. @InvocableMethod
     global static ListRecommendation getLevel(List<ContactWrapper> input)
     {/*implementation*/}
B. @InvocableMethod
     global static List<List<Recommendation>> getLevel(List<ContactWrapper> input)
     {/*implementation*/}      - Is this the correct answer?
C. @InvocableMethod
     global List<List<Recommendation>> getLevel(List<ContactWrapper> input)
     {/*implementation*/}
D. @InvocableMethod
     global Recommendation getLevel(ContactWrapper input)
     {/*implementation*/}

4.  A developer created this Apex trigger that calls
MyClass .myStaticMethod: trigger myTrigger on Contact(before insert) ( MyClass.myStaticMethod(trigger.new, trigger.oldMap); }

The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exist?

 A. The deployment fails because the Apex trigger has no code coverage. –is this the right answer becuz the test method did not cover the trigger?
 B. The deployment fails because no assertions were made in the test method.
 C. The deployment passes because the Apex code has required (>75%) code coverage.
 D. The deployment passes because both classes and the trigger were included in the deployment.
 
  • March 25, 2020
  • Like
  • 1
How can we utilized the SASS (preprocessor) in out lightning web components.
How can I delete a flow version in Flow Builder Winter 20 release?

In Winter 20 release Flow builder is returning a "Maximum flow versions reached error" error when attempt to save as new version.  Flow builder has a limit of 50 versions per flow.  In the past release of Flow Builder, I was able to delete the oldest versions to solve this problem.  I do not see that there is access to previous flow versions. 
WHen i closed my case in DEV its setting the end time but in QA it is not working. I have verified "Set Field-Level Security" also.

Please help me to reslove this issue!!!
Hi all

When creating a record of object X, a user has to pick a value from a lookup-relation field Y. The user scrolls through all the values and picks whichever one feels fitting. I was wondering if there is a way to let the user scan a barcode to populate field Y? This would be done in the Salesforce1 app.

Thanks in advance!
If anyone gets this error message: "The dashboard configuration that allows users to see only their own data is incorrect"...
error message

The solution is to check The Dashboard Viewer radio button in the dashboard settings--in the "View Dashboard As" section.
Hi,

I'm not able to complete #2 Automate Accounts. It give me the following error.
"Challenge Not yet complete... here's what's wrong:
Please check the configuration of the custom fields on the Account object. The formulas, rollup summaries, etc. did not produce the expected outcome."


Can anyone tell me what went wrong? Thanks.

My Custom Fields configuration are as following:
  • Number of deals (Roll-Up Summary field): Count Opportunity. No filter criteria
  • Number of won deals (Roll-Up Summary field): Count Opportunity with filter criteria as "Stage equals Closed Won"
  • Last won deal date (Roll-Up Summary field): MAX(Opportunity: Close Date) with filter criteria as "Stage equals Closed Won"
  • Deal win % (Formula field): Number_of_won_deals__c / Number_of_deals__c
  • Total amount of won deals (Roll-Up Summary field): SUM(Opportunity: Amount) with filter criteria as "Stage equals Closed Won"
  • Call for Service (Formula field): IF( DATE( YEAR(Last_won_deal_date__c)+2 , MONTH(Last_won_deal_date__c) , DAY(Last_won_deal_date__c) ) <= TODAY(), 'YES', 'NO')
Hey everyone,

I just completed the Security Superbadge and I found it rather confusing...not because it's particularly difficult to pass the individual steps/challenges, but because there are several red herrings that led me to believe I had to implement things that weren't actually tested. Examples:
  1. Remote workers must use VPN to access Salesforce.
  2. All mobile users must use two-factor authentication (2FA).
  3. All mobile users must be individually approved by the admin.
  4. Customer SSN and Bank Account fields on contact records must be encrypted.
None of these are checked in their entirety. Numbers 1, 3 and 4 are not ever checked in any way. I might just lack the knowledge here, but are numbers 2 & 3 even possible? That is, can you make 2FA only required on mobile? I don't even know what "individually approved by the admin" means in relation to mobile access. To that end, does it mean Salesforce1 or does it mean mobile browser loading Classic? In either case - is it even possible to prevent access to both from a profile-level perspective?

This challenge took me a while because of these red herrings. When I finally realized they're just superfluous I was able to easily breeze through the challenges. (Pretty frustrating experience...)

Hello. I have a Force.com Site domain configured, and a Force.com site. The Force.com Site domain shows under Domains > My Domains. I can query the Site object, and it has the proper SubDomain value.

According to the docs, I should be able to query the Domain object and find this Force.com Sites domain. Also, there should be a DomainSite record linking the Site to the Domain. Right?

I query both the Domain and DomainSite objects (as a System Administrator), and both queries return no results.

I want to check, from Apex code (or using the Metadata API or something) whether there's a Force.com Sites domain set already on the org, and it's sub-domain component. Even when there are no sites created (I guess in that case I could query for a Site record with Type = Force.com Site, and use the SubDomain value?).

The final objective here, is being able to programatically create a Force.com Site. We intend to use the Metadata API for doing this.

Any ideas? Thanks!

  • September 28, 2016
  • Like
  • 1

Simply put the following formula into a formula field of type "Text":

 

Id
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
    IF(FIND(MID(Id,1,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
    +IF(FIND(MID(Id,2,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
    +IF(FIND(MID(Id,3,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
    +IF(FIND(MID(Id,4,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
    +IF(FIND(MID(Id,5,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
    )+1,1)
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
    IF(FIND(MID(Id,6,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
    +IF(FIND(MID(Id,7,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
    +IF(FIND(MID(Id,8,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
    +IF(FIND(MID(Id,9,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
    +IF(FIND(MID(Id,10,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
    )+1,1)
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
    IF(FIND(MID(Id,11,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
    +IF(FIND(MID(Id,12,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
    +IF(FIND(MID(Id,13,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
    +IF(FIND(MID(Id,14,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
    +IF(FIND(MID(Id,15,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
    )+1,1)

 

This is an optimized version of the code example "BPS: 18 digit external ID within the UI" you can find on the Online Help, but unlike the example provided there, it is small enough to fit into a formula field. Also, this code doesn't contain the error found in the online help example, where the second character byte equivalent of the first 5-character chunk was "4" instead of "2". I'd be more than happy if someone could come up with an even shorter version of this formula...Still, I hope you can use this.

 

Cheers,

Erik Mittmeyer