Skip to main content

#LWC33 人正在讨论

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

6 个回答
  1. 9月3日 16:13

    Hi Kavya, 

     

    Building on the thread — if ProfileId is confirmed non-null right before the call and it's still throwing REQUIRED_FIELD_MISSING: [Profile], the next thing to isolate is execution context: 

     

    1. Confirm whether your Apex is running "with sharing" or plain (not "without sharing" explicitly) — Site.createExternalUser() needs to execute with elevated setup-object permissions, so if it's inheriting the Community Plus user's restricted session context instead of running as intended, the Profile assignment can get silently dropped even with a valid Id. 

     

    2. Check the executing user (or the context the Apex actually runs under) has Manage External Users, and ideally test with Manage Users temporarily to rule out a permission gap vs. a code issue. 

     

    3. Try hardcoding a known-good Profile Id directly in an anonymous Apex test (bypassing your LWC/Custom Metadata layer entirely) and call Site.createExternalUser() with it. If that also fails with the same error, it's confirmed to be a permissions/context issue, not a value-passing issue in your component. 

     

    Reference:

    https://help.salesforce.com/s/articleView?id=005094369&language=en_US&type=1

     

     

    The anonymous Apex test is the fastest way to isolate whether this is your code or your running user's permissions.

0/9000
4 个回答
  1. 9月3日 11:37

    Hi @Hitesh Sharma

      

    You can use 

    VS Code with the Salesforce Extension Pack and Salesforce CLI to retrieve Apex, LWC, and other metadata from your Salesforce org. 

    After authorizing the org, use SFDX: Retrieve Source from Org in VS Code to retrieve the required components. 

    For JSON files, it depends on where they are stored: 

    • Static Resource/LWC bundle → retrieve the corresponding metadata. 
    • Salesforce record/data → use SOQL, Data Loader, or another data-export tool. 

     

    Hope this helps! 

0/9000

Welcome to the #TrailblazerCommunity! 👋 Take a moment to introduce yourself below. 💙 

 

Tell us all about YOU:

What are you passionate about? 

What are you looking to learn? 

Where are you located? 

 

Feel free to connect with others in the thread! 👇 

 

UPDATE: To mute this post, click on the arrow on the top right then "Mute."

2,014 条评论
0/9000

Hello Everyone, 

 

I’ve been working as an End User for Salesforce for more than a year and recently  completed by training in Salesforce Admin, Apex and LWC concepts. I've also successfully completed Admin and PD1 certifications. 

 

I've been on a job trail for about 3 months and don't see any open positions for Freshers or juniors in the market. 

 

Would it be possible for anyone of you to refer me for any open roles in your esteemed  

organizations ? 

 

I'm happy to work in start-ups if given an opportunity. 

 

Thank you for your help in advance. 

 

#Salesforce Admin  #Salesforce Developer  #End Users  #Other Salesforce Applications

 

 

#Apex  #LWC

4 个回答
  1. 8月18日 05:24

    Great work on completing your Salesforce Admin and PD1 certifications, @Avinash Tellakula. Your hands-on End User experience combined with Apex and LWC training is a good foundation for starting a Salesforce career.

    The entry-level market can definitely be challenging, but don’t lose momentum. I’d be happy to take a look at your profile/resume and see if I come across any suitable opportunities within my network. Best of luck with your job search!

0/9000

🎥 I've started a YouTube channel — SalesforceDevDaily! 

 

Sharing the concepts, hacks, and lessons I've learned working as a Salesforce Developer — Apex, LWC, and real project tips. 

Channel Link:-

https://youtube.com/@salesforcedevdaily?si=33wpFFurKxhWvBEI

 

 

Subscribe and let's learn together! 🚀 

#Salesforce #Apex #LWC #Trailblazer

3 条评论
0/9000

Hi Everyone :)  

 

Is there a way to add a fixed 'banner' to an embedded service deployment so that there's a constant disclaimer on the chat? Similar to the 'Powered by Agentforce' but customised text? 

 

#Agentforce  #Embedded Service Deployment  #LWC  #Trailhead  #Help

2 个回答
  1. 8月19日 16:58

    Hey Megan, 

     

    Adding one thing to Himanshu's answer since it's mostly right but slightly understates option 2: Salesforce actually has a fully supported LWC-based header customization for Messaging (lightningSnapin__MessagingHeader target), you extend the base chat header component and can add whatever fixed text/markup you want inside it. This is documented and stays visible for the whole conversation, unlike the greeting-message approach, which scrolls away. 

     

    So realistically you have two solid, supported paths: 

    1. Custom LWC header (extends BaseChatHeader/MessagingHeader), gives you a persistent banner area inside the actual chat window that Salesforce won't overwrite on releases, since it's a supported customization point, not DOM hacking 

    2. A banner on your host page around the widget (Himanshu's option 1), simplest if the disclaimer doesn't need to be inside the chat window itself 

     

    Both are supported. The custom header route is probably closer to what you're picturing since it sits inside the widget alongside "Powered by Agentforce," not just around it. 

     

    Reference:

    https://developer.salesforce.com/docs/service/messaging-web/guide/customize-header.html

0/9000

Available for freelance and project work — Salesforce Solution Architect, 5x certified, Double Star Ranger 

 

One of the biggest pain points I hear from Salesforce orgs isn't what they want to build — it's that nobody fully understands what they already have. Undocumented automations, mystery Apex, flows nobody wants to touch, integrations with no runbook. If that sounds familiar, this might be for you. 

 

I offer:

  • Org assessments with full documentation of your processes, automation, and architecture
  • Process Builder & Workflow migration to modern Flow — or Apex where Flow hits its limits. If your org is still running on deprecated automation, that's a ticking clock
  • Builds, integrations, Health Cloud, Experience Cloud, MuleSoft, Apex and LWC development

15 years on the platform, PwC consulting background, currently the sole architect for a 200-user org with ERP integration and Data Cloud pipelines.  

 

Drop a comment or message me if you want a second set of eyes on your org.

 

Trailhead: https://trailblazer.me/id/egentile2

LinkedIn: https://www.linkedin.com/in/eileengentile/

 

#Freelance Project Work  #Flow  #ApexDevelopment  #LWC

#Job Postings  #Open Jobs  #Jobopportunities  

0/9000

Hi, I am using servlet.shepherd to downlaod multiple files from a LWC at once . If one of the files, has a special character, it is getting downloaded inside the zip file with its content version Id as its name,  

On the other hand, if a single file with special character is downloaded, it is getting downloaded successfully with the original name,  

Can anybody help. Is this a standard behaviour or we have a way out to handle this. 

 

#Trailhead  #Salesforce Admin  #Salesforce Developer  #LWC  #LWC Component  #Files Section

1 条评论
0/9000
0/9000

📢 【Trailhead Academyより新コースのご連絡】

「Lightning Web コンポーネントプログラミング [前編] [後編]」

 

Trailhead Academyより新しいコース開始のお知らせです。 

本コースでは、Lightning Web コンポーネント(LWC)を作成して、Lightning ExperienceとSalesforce モバイルで動作するカスタムアプリケーションの開発方法を学習します。

 

フローや動的フォームを活用すれば、コードを書かなくても効率的なシステム作りを行うことが可能ですが、複雑なビジネス要件を完遂し、標準機能の限界を超える高度なUIを実現するには、プロフェッショナル開発の標準である Lightning Web コンポーネント(LWC) のスキルが不可欠です。

単なる機能紹介にとどまらず、現場で戦えるエンジニアを育成するための体系的なカリキュラムになっています。

ぜひご受講を検討ください。

 

コース名&お申し込み:

  • Lightning Web コンポーネントプログラミング [前編] (DEX602-1) (期間:3日):お申し込み
  • Lightning Web コンポーネントプログラミング [後編] (DEX602-2) (期間:2日):お申し込み

 

受講対象者:

  • カスタム Lightning Web コンポーネントと複数の Salesforce 環境で動作するアプリケーションを開発したい独立系ソフトウェアベンダー(ISV)および Web アプリケーション開発者
  • Salesforce 認定 JavaScript デベロッパー」資格の取得を目指す方

 

初回開催日程:

  • [前編] 2026年7月1日-3日
  • [後編] 2026年7月6日-7日

 

@* カスタマーサクセス日本 *

 

#LWC

0/9000