Skip to main content

#Experience Cloud35 人正在讨论

I need to deploy the head markup for an experience cloud site using Aura framework. I deployed Experience Bundle using Copado but that didn't move the changes. Can you tell which metadata needs to be deployed for the head markup to be moved between environments?  

@George Abboud

 

 

#Experience Cloud

0/9000

Trying to save one email for multiple policies, but noticed that this doesn't work perhaps overlooking a step.

Select an email

Select SF app

Save on one policy

Try logging same email on another policy

Notice on the policy this is not saved

Can you please check?

Salesforce email can't be saved multiple times?      

9 个回答
  1. 9月28日 11:08

    Hi @Vishal Verma

     

     

      

    Hi --->>>how will the Trigger know which other policies the message should link to. But it hints to a solution.

    --->>>

    how will the Trigger know which other policies the message should link to. But it hints to a solution.

    Maybe if the conversation is still open with Support, then also ask them if it is possible to control this from the Salesforce Outlook Add-In which you are currently using. Is there a way to specify more policies (or other entities) to upload the email to? 

    Could you please Guide me on this ?

0/9000

I have a problem that when I log into the community page as a community user profile I can't see my user profile image, even i can't select one or change it. In the builder the image appears and if I log as an admin I can see the image.

Can't see user profile image when I log in the community page as a user

 

2022-04-05 11_53_34-SuperUser.png

 @* Experience Cloud *

3 个回答
  1. 2022年4月6日 20:53

    Control User Visibility in Your Experience Cloud Site (p. 240-241 in Experience Cloud documentation) link 

     

     Change your org’s settings to control your Experience Cloud site’s user visibility for authenticated members and guest users.

     1. From Setup, enter Sharing Settings in the Quick Find box, then select Sharing Settings.

    2. Click Edit in the Organization-Wide Defaults area.

     3. Enable Portal User Visibility or Site User Visibility based on your org’s needs. 4. Click Save.  

    Note: To view record names in lookup fields and system fields, such as Created By and Last Modified By, select the Require permission to view record Names in lookup fields checkbox. Then enable the View All Lookup Record Name permission in custom profiles or permission sets for users who must see record names in all lookup and system fields, regardless of sharing settings. You can manage user visibility and guest user visibility on a site-by-site basis. 1. From Setup, enter Digital Experiences in the Quick Find box, then select Digital Experiences > All Sites. 2. Click Workspaces for the site you’d like to access. 3. Click Administration > Preferences. 240 Set Up and Manage Experience Cloud Sites Control Which Users Experience Cloud Site Users Can See 4. Select the See other members of this site or Let guest users see other members of this site checkboxes based on your site’s needs. 5. Click Save.

     Note: To see user profile photos for other users in your site, select the See other members of this site or Let guest users see other members of this site checkboxes. User profile photos display in feeds by default.

0/9000

I'm looking for a way to allow internal Users to easily send a password reset email to Community Users. There are standard Buttons/Actions to enable a Community User or log in as a Community User that can be accessed on a Contact's record. I'd like to have a similar option for sending a password reset email. Any tips?

 

Right now, internal Users have instructions for sending that email through Setup, but I'd like to simplify that process and remove the ability for them to access Setup.

 

Thanks!

5 个回答
0/9000

Trying to embed or host a SCORM file on my Experience Cloud site. I partner with our Training team who uses an external LMS for Learning, but they created a module that would be great to have on a specific page.

 

I'm wondering what the easiest way to do this is? I keep running into issues with the top 2 apps I came across:

 

Daniwoo - multiple repeated errors installing package (reached out to them)

Appinium - the components are deprecated and I don't see a way to update them (reached out to them)

 

Is there a way I could embed an iframe into the site using HTML from the LMS, or is there another way to play SCORM files directly on the site?

4 个回答
  1. 9月7日 15:00

    Hi @Kyle Shelton

    following up on my earlier reply with more substance, and full disclosure again: I'm the founder of Daniwoo. 

     

    First, on the install errors you hit: I'm sorry about that experience. Those package installation issues were fixed in a later release, and installs have been clean since. If you (or anyone reading this later) hit anything similar, reach out and I'll look at it personally. 

     

    Now the actual technical answers to your two questions, which nobody gave you: 

     

    1. Embedding an iframe from your external LMS on the Experience Cloud page — it can work for playback, but there are two catches. Tracking stays inside the external LMS: Salesforce never sees completions, so no reports, no Flows on completion. And iframe auth is fragile: most LMSs authenticate with cookies, and browsers (Safari/iOS especially) increasingly block third-party cookies inside iframes, so your users may hit login walls or silent tracking failures on mobile. 

     

    2. Playing SCORM files directly on the site — a SCORM package isn't a media file, it's a zip containing a JavaScript application that expects to find a SCORM runtime API (API for 1.2, API_1484_11 for 2004) in a parent window. Experience Cloud has no such runtime natively, which is why uploading the zip to Files or a rich-text area does nothing. You need a player component that exposes that API and writes the tracking data (status, score, time) somewhere reportable — ideally as Salesforce records so your Training team can see completion in standard reports. 

     

    Hope that helps whoever lands here from Google — this question comes up a lot. 

0/9000

Hi Community Members,   

I'm currently setting up a Salesforce Experience Cloud site and have configured the Login Discovery Page as the login page type. My goal is to allow users to log in using either mobile number or email, and receive an OTP instead of being redirected to enter a password.

However, I'm running into an issue:

  • When I enter a mobile number (e.g., 7972101144, 07972101144, or +917972101144), it redirects me to the password entry page instead of triggering OTP verification.
  • I want the system to send an OTP whether the user logs in with email or mobile number.

Additionally, I'm seeing the following error:  'Check your entry. If you still can't log in, contact your BankServices administrator.' in  AutocreatedDiscLoginHandler1747659242240 code:-  // This auto-generated class contains the default logic for login discovery by SMS or email.   // You can customize the code to ensure it meets your needs. The requestAttributes parameter   // provides additional information you can use in the discovery logic. Attributes include CommunityUrl,   // IpAddress, UserAgent, and location information (such as Country and City).     global class AutocreatedDiscLoginHandler1747659242240 implements Auth.LoginDiscoveryHandler {    global PageReference login(String identifier, String startUrl, Map<String, String> requestAttributes) {    if (identifier != null && isValidEmail(identifier)) {      // Search for user by email       List<User> users = [SELECT Id FROM User WHERE Email = :identifier AND IsActive = TRUE];      if (!users.isEmpty() && users.size() == 1) {        // User must have verified email before using this verification method. We cannot send messages to unverified emails.         // You can check if the user has email verified bit on and add the password verification method as fallback.        List<TwoFactorMethodsInfo> verifiedInfo = [SELECT HasUserVerifiedEmailAddress FROM TwoFactorMethodsInfo WHERE UserId = :users[0].Id];        if (!verifiedInfo.isEmpty() && verifiedInfo[0].HasUserVerifiedEmailAddress == true) {          // Use email verification method if the user's email is verified.          return discoveryResult(users[0], Auth.VerificationMethod.EMAIL, startUrl, requestAttributes);        } else {          // Use password verification method as fallback if the user's email is unverified.          return discoveryResult(users[0], Auth.VerificationMethod.PASSWORD, startUrl, requestAttributes);        }      } else {        throw new Auth.LoginDiscoveryException('No unique user found. User count=' + users.size());      }    }    if (identifier != null) {      String formattedSms = getFormattedSms(identifier);      if (formattedSms != null) {        // Search for user by SMS         List<User> users = [SELECT Id FROM User WHERE MobilePhone = :formattedSms AND IsActive = TRUE];        if (!users.isEmpty() && users.size() == 1) {          // User must have verified SMS before using this verification method. We cannot send messages to unverified mobile numbers.           // You can check if the user has mobile verified bit on or add the password verification method as fallback.          List<TwoFactorMethodsInfo> verifiedInfo = [SELECT HasUserVerifiedMobileNumber FROM TwoFactorMethodsInfo WHERE UserId = :users[0].Id];          if (!verifiedInfo.isEmpty() && verifiedInfo[0].HasUserVerifiedMobileNumber == true) {            // Use SMS verification method if the user's mobile number is verified.            return discoveryResult(users[0], Auth.VerificationMethod.SMS, startUrl, requestAttributes);          } else {            // Use password verification method as fallback if the user's mobile number is unverified.            return discoveryResult(users[0], Auth.VerificationMethod.PASSWORD, startUrl, requestAttributes);          }        } else {          throw new Auth.LoginDiscoveryException('No unique user found. User count=' + users.size());        }      }    }    if (identifier != null) {      // You can customize the code to find user via other attributes, such as SSN or Federation ID    }    throw new Auth.LoginDiscoveryException('Invalid Identifier');  }      private boolean isValidEmail(String identifier) {      String emailRegex = '^[a-zA-Z0-9._|\\\\%#~`=?&/$^*!}{+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$';      // source: http://www.regular-expressions.info/email.html       Pattern EmailPattern = Pattern.compile(emailRegex);      Matcher EmailMatcher = EmailPattern.matcher(identifier);      if (EmailMatcher.matches()) { return true; }      else { return false; }    }      private String getFormattedSms(String identifier) {      // Accept SMS input formats with 1 or 2 digits country code, 3 digits area code and 7 digits number      // You can customize the SMS regex to allow different formats      String smsRegex = '^(\\+?\\d{1,2}?[\\s-])?(\\(?\\d{3}\\)?[\\s-]?\\d{3}[\\s-]?\\d{4})$';      Pattern smsPattern = Pattern.compile(smsRegex);      Matcher smsMatcher = SmsPattern.matcher(identifier);      if (smsMatcher.matches()) {        try {          // Format user input into the verified SMS format '+xx xxxxxxxxxx' before DB lookup          // Append US country code +1 by default if no country code is provided          String countryCode = smsMatcher.group(1) == null ? '+1' : smsMatcher.group(1);          return System.UserManagement.formatPhoneNumber(countryCode, smsMatcher.group(2));        } catch(System.InvalidParameterValueException e) {          return null;        }      } else { return null; }    }    private PageReference getSsoRedirect(User user, String startUrl, Map<String, String> requestAttributes) {    // You can look up if the user should log in with SAML or an Auth Provider and return the URL to initialize SSO.    return null;  }    private PageReference discoveryResult(User user, Auth.VerificationMethod method, String startUrl, Map<String, String> requestAttributes) {    //Only external users with an External Identity or community license can login using Site.passwordlessLogin    //Use getSsoRedirect to enable internal user login for a community    PageReference ssoRedirect = getSsoRedirect(user, startUrl, requestAttributes);    if (ssoRedirect != null) {      return ssoRedirect;    } else {      if (method != null) {        List<Auth.VerificationMethod> methods = new List<Auth.VerificationMethod>();        methods.add(method);        PageReference pwdlessRedirect = Site.passwordlessLogin(user.Id, methods, startUrl);        if (pwdlessRedirect != null) {          return pwdlessRedirect;        } else {          throw new Auth.LoginDiscoveryException('No Passwordless Login redirect URL returned for verification method: ' + method);        }      } else {        throw new Auth.LoginDiscoveryException('No method found');      }    }  }  }   

I'm a beginner in Experience Cloud, and haven’t found any helpful videos or documentation online explaining how to achieve this. I'm attaching a screenshot of the error and mentioning the auto-generated login code here for reference.

Could someone please guide me step-by-step on how to solve this issue and implement OTP login for both email and mobile number through the Login Discovery Page?

Thanks in advance for your help!  

 

@* Experience Cloud *  @* Salesforce Developers * 

4 个回答
  1. 9月11日 09:03

    @Yash Raj

      

    that redirect is your handler behaving exactly as written, not a bug. In the SMS branch it only returns Auth.VerificationMethod.SMS (OTP) when HasUserVerifiedMobileNumber == true, and otherwise deliberately falls back to PASSWORD (same for email via HasUserVerifiedEmailAddress), so any user whose mobile hasn't been verified yet is always routed to the password page, which is exactly what you're seeing. To get OTP, that user's mobile must be a verified method first so the flag flips to true (verify it once; note SMS verification also needs the Identity Verification Credits add-on, or the code can never be sent); if you'd rather force OTP even for a first-time unverified number, return Auth.VerificationMethod.SMS directly instead of the password fallback. The separate "Check your entry... contact your administrator" error is the handler throwing a LoginDiscoveryException because the lookup didn't find exactly one active user, so make sure the stored Mobile value equals the canonical string that formatPhoneNumber('+91','7972101144') produces (one active user only) and save the number in that exact format. If this helps, please mark it as the Best Answer so it helps the next person, thanks!

0/9000

Hi there! We recently made out Knowledge base articles public so they can be indexed by Google and other search engines. Are there any best practices that you all can recommend to improve SEO performance? Also, has anyone been able to get Google to create Featured Snippets from your Experience Cloud site and Knowledge base?

4 个回答
  1. 8月15日 16:37

    A few things I’d focus on:

    • Use clear, search-intent-focused titles and headings.
    • Give concise, direct answers that can work well for featured snippets.
    • Add relevant internal links between Knowledge articles.
    • Make sure pages are crawlable/indexable with unique meta titles and descriptions.
    • Keep content updated and genuinely useful.

    For Experience Cloud, Google Search Console is also very useful for finding queries where your articles are already getting impressions and improving them.

    Featured Snippets can’t be guaranteed, but good structure + clear answers can improve your chances.

    I work in SEO & local search as well local SEO Agency

0/9000

1. We have a community site. 

 2. There we have a page. 

 3. In that page, we have a link. 

 4. On click of that link a file opens up. the requirement is that only 'logged in user' should be able to open and see the file. 

 5. Nobody else should able to see it. 

 

More info using scenerio:- File should only opened with the help of click within the community site. After opening the file. If somebody copy the URL from address bar and then pasted in the 'incognito mode' then file should not be opened.  

 

Current progress:- 

 

I researched about and got solution related to pre-signed Url but i think it's the solution with help of code. I searching for any workaround using configuration within the AWS account.  

 

Any help would be appreciated. 

 

#Trailhead  #Experience Cloud  #Experience Site  #AWS S3  #AWS  #Lightning Aura Components  #Salesforce Developer  #Salesforce Admin

5 个回答
  1. 9月9日 15:42

    Hi Kushagra, 

     

    Yes, creating an IAM user is the correct path, and it's confirmed by AWS's own official documentation, not just common practice. AWS explicitly recommends creating an IAM user with least-privilege permissions first, then generating access keys under that IAM user, never using your AWS root account credentials for this. 

     

    Steps to get your Access Key and Secret Key (official AWS process): 

     

    1. Log into the AWS Console with your root/admin account (only for this setup step, not for ongoing use). 

    2. Go to IAM > Users > click "Create user". 

    3. Give it a descriptive name, e.g. salesforce-s3-integration. 

    4. Do NOT enable AWS Management Console access, this user only needs programmatic access, not console login. 

    5. Attach a permission policy scoped only to what's needed, ideally a custom policy limited to s3:GetObject on your specific bucket/prefix, not full S3 access. This follows AWS's least-privilege guidance. 

    6. After the user is created, go to that user > Security credentials tab > Access keys section > "Create access key". 

    7. Select the use case (choose "Application running outside AWS" or similar, matching your Apex callout scenario). 

    8. AWS shows you the Access Key ID and Secret Access Key ONCE. Download the CSV or copy both immediately, the Secret Access Key cannot be retrieved again after this screen, you'd have to delete and recreate the key if lost. 

     

    Official reference:

    https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html

     

     

    Important note on "is this the only way": Technically no, AWS's own best-practice guidance actually recommends AGAINST long-term access keys where avoidable, and prefers IAM Roles with temporary/short-term credentials (via AWS STS) since those auto-expire and reduce risk if leaked. 

    Official reference:

    https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds-programmatic-access.html

     

     

    However, for a Salesforce Apex integration specifically, since Apex runs outside AWS and can't assume an IAM role directly the way an EC2/Lambda service can, using a scoped-down IAM user with long-term access keys (stored securely in Named Credential/Protected Custom Metadata, as I mentioned earlier) is the practical and accepted approach here. Just make sure to: 

    - Scope the policy to only that one bucket/prefix 

    - Rotate the access key periodically 

    - Never commit it to code, always pull from Named Credential/Custom Metadata at runtime 

     

    So to directly answer: yes, IAM user + access key is the right and standard way for your use case.

0/9000

Hi everyone,

I'm currently working on an Experience Cloud site using the LWR template.

When the "Fix theme header" option is enabled in the Theme Layout settings, any lightning/toast notifications are rendered underneath the fixed header, making them barely visible or completely hidden. (Please see the attached screenshot for reference.)

This behavior occurs consistently and affects usability, especially when showing important success/error messages to users.

Has anyone encountered this issue? 

 Is there a recommended workaround or CSS override to ensure the toast appears above the fixed header?

Thanks in advance!

 

 

LWR + Fixed Header causes lightning/toast to be hidden underneath the header

 

 

 

SCR-20250620-nkjj.png

 

 

 

3 个回答
  1. 9月7日 11:00

    lightning-toast-container { 

      z-index: 100001 !important; 

    } 

     

    in your stylesheet should fix this, or something similar depending on the class you're using for your toast.

0/9000

Hi Everyone,

I have an Experience Cloud site where the users are using the Customer Community Plus license.

I have a requirement to create a new Customer Community Plus user from an LWC/Apex component. As part of the user creation process, I need to select the appropriate Customer Community Plus Profile.

To populate the Profile selection, I need to fetch the available Profiles from the org using Apex.

I tried the following SOQL:

List<Profile> profiles = [

SELECT Id, Name

FROM Profile

];

However, when this code executes in the context of a Customer Community Plus user, I receive the following error:

sObject type 'Profile' is not supported

I also understand that Experience Cloud users have restrictions on accessing certain standard objects.

My questions are:

  1. Is there any way to grant a Customer Community Plus user access to the Profile sObject through a Profile, Permission Set, or any other Salesforce configuration?
  2. If direct access to the Profile object is not supported for Customer Community Plus users, what is the recommended Salesforce approach for retrieving the appropriate Customer Community Plus Profile when creating another user?
  3. Is there any supported Apex/API approach to retrieve the available Customer Community Plus Profiles without directly querying the Profile object?

My requirement is specifically:

Existing Customer Community Plus user → LWC/Apex → Create a new Customer Community Plus user → Select the appropriate Customer Community Plus Profile

Any guidance or recommended approach would be greatly appreciated.

Thanks! 

 

#Salesforce Developer  #LWC  #Profiles  #Experience Cloud

7 个回答
  1. 9月7日 10:13

    I am getting this below error  when I use Site.createExternalUser() .

    common.apex.runtime.impl.ExecutionException: [You are already logged in.]

      

    Please suggest

0/9000