Hey there,
I'm configuring an instance (as admin) and I have enabled the medication manager from setup, added the LWC to the person page and (as admin) I can search and add medications to a person.
But, if I swap to a regular user I get an error of "Index 0 out of bounds for length 0" (super helpful) and I am unable to search the list of medications, I just get a loading image.
Why would this be working as admin, but not as a regular user? The regular user can see the LWC and even more bizzarely, if they search for a medication using the full work, like panadol, they can save that entry... but the type ahead for medication seems to fail.
Given the information you've provided, it indeed seems like a more complex issue, and not one typically related to permissions or errors in the browser console. The problem could be related to how the flow is interacting with the standard object, or some specific configuration within Health Cloud.
1. Check Profiles and Permission Sets: Since Medication is a standard object, ensure the regular user's profile has the correct CRUD permissions for that object. Look at any specific permission sets that might be related to Health Cloud functionality.
2. Review Field-Level Security: Ensure that the regular user has read/write access to all the relevant fields on the Medication object that are being accessed by the flow.
3. Inspect the Flow: Open the flow in Flow Builder and inspect the elements interacting with the Medication object. Make sure there's no hard-coded ID or any settings that might cause a malfunction for regular users.
4. Examine the Network Request: Since you mentioned that the POST request is returning a 200 status code, it might be helpful to inspect the actual content of the response. There might be information in the JSON response that indicates what's going wrong.