• Ryan Werner 22
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
Hello-

We have a junior developer who wrote a very large lightning component that has over 1,000 references to:

<aura:if isTrue="{!v.profileName =='System Administrator'}"

The issue we have is now we need additional profiles, all containing "Admin" in the name to this. Is there a way to copy/replace all so I don't have to go through each individual reference and add || or && conditions to it? Is something like this doable:

<aura:if isTrue="{!CONTAINS(v.profileName, 'Admin'}"

or

<aura:if isTrue="{!v.profileName == '%Admin'}"

In some cases we may need an || condition in some cases we may need an && condition. So i cannot just to a global replace to add the additional profile names here.

Thanks
Hello-

We have a requirement where community users will need to see different accounts within the account hierarchy based on their user profile. Below is an example of an account hierarchy:
  • Global Account 1
    • USA 1
      • USA 1 Branch 1
        • USA 1 Branch 1 Sub-Account 1
      • USA 1 Branch 2
        • USA 1 Branch 2 Sub-Account 1
        • USA 1 Branch 2 Sub-Account 2
    • Canada 1
      • Canada 1 Branch 1
        • Canada 1 Branch 1 Sub-Account 1
        • Canada 1 Branch 1 Sub-Account 2
      • Canada 1 Branch 2
        • Canada 1 Branch 2 Sub-Account 1

The hierarchy will never go deeper than the sub-account level. Our community users will be added to each Branch level account - there will be no users on the Global, Country, or Sub-Account accounts.

There are 3 levels of access we will determine by the community users profile:
- Global
- Country
- Branch

A Global community user needs access to Global Account 1 and everything below in the hierarchy.

A Country community user needs access to the parent Country account and everything below in the hierarchy.

A Branch community user needs access only the the branch they belong to and the Sub-Accounts below that branch.


For example, John Smith is a community user with the Global profile. His contact is attached to USA 1 Branch 1 account. Therefore he needs access to every account listed.


Kevin Doe is a community user with the Country profile. He is attached to USA 1 Branch 1 account as well. He needs access to USA 1 account and every account below in the hierarchy.


Jane Johnson is a community user with the Branch profile. She is also attached to USA 1 Branch 1. She needs access to only USA 1 Branch 1 as well as the sub-accounts below this account in the hierarchy.


This is kind of a complicated requirement and we are not certain how to implement this without writing custom Apex Sharing Rule logic. Is there anyway using out of the box features we can implement this requirement?

Would attaching the users to the Account they need highest access to be an option? Combined with using something like an external account hierarchy? So a Global user would be attached to the Global Account 1 and have access to everything underneath, a Country user would be attached to the country account (say, USA 1) and have access to everything underneath?


Any ideas would be greatly appreciated. Thanks
We have a Salesforce community implementation and at the same time do not have a concept of role hierarchy in our org. Right now all internal users have the same role, "Sales User". Up until now, allowing all accounts to be viewed by all internal users was part of the requirements. Now, we want certain accounts hidden while having all other accounts remain open.

Our OWD for Account is set to "Private".

We created a sharing rule to open access of all Accounts with IsPrivate__c = false to the "Sales User" role.

What we are finding is every internal user is still allowed to view private accounts because of the sharing reason "Associated Portal User or Role" and sharing relationship of "Manager of Role Member". This is because the owners of the community Account are "Sales User" roles and therefore it is horizontally opening all sharing with all Sales Users. All community users assigned to that Account have the "AccountNameHere Customer User" role which reports to the "Sales User" role (because the Account owner is a Sales User).
How can we disable this horizontal role sharing? If I change an Account owner to a role above "Sales User", then the horizontal sharing with "Sales User" is removed (and instead shared with any of the new role or higher). We could introduce more roles, however this wouldn't accomplish anything because whatever role the owner is still we be shared with other users in that role and above.
Any ideas? Are there any settings under Sharing Settings or anything in the community settings that need to be tweaked?

Thanks
Hello-

I have created a structure to change our syncrhonous callouts to asyncrhonous using a continuation. We also are using Apex remoting. I have an abstract class which contains a method called "callbackCheck". The class which extends from this contains the remote methods that return the continuation. The callback always first goes to the callback check on the abstract class, and then once it verifies a valid response, it then invokes the proper callback for that specific service.

The issue I'm having is with writing the test class. When this runs, it cannot find the "callbackCheck" method. The "ctrl" is the controller which is abstracted from the abstract class, so the test is complaining it can't find "callbackCheck" on the controller:
Object result = Test.invokeContinuationMethod(ctrl, conti);
I cannot construct an abstract class so I cannot pass it instead of ctrl.

Is there anyway the continuation can view the callbackCheck on the abstract class?

Thanks!
 
We have a Salesforce community implementation and at the same time do not have a concept of role hierarchy in our org. Right now all internal users have the same role, "Sales User". Up until now, allowing all accounts to be viewed by all internal users was part of the requirements. Now, we want certain accounts hidden while having all other accounts remain open.

Our OWD for Account is set to "Private".

We created a sharing rule to open access of all Accounts with IsPrivate__c = false to the "Sales User" role.

What we are finding is every internal user is still allowed to view private accounts because of the sharing reason "Associated Portal User or Role" and sharing relationship of "Manager of Role Member". This is because the owners of the community Account are "Sales User" roles and therefore it is horizontally opening all sharing with all Sales Users. All community users assigned to that Account have the "AccountNameHere Customer User" role which reports to the "Sales User" role (because the Account owner is a Sales User).
How can we disable this horizontal role sharing? If I change an Account owner to a role above "Sales User", then the horizontal sharing with "Sales User" is removed (and instead shared with any of the new role or higher). We could introduce more roles, however this wouldn't accomplish anything because whatever role the owner is still we be shared with other users in that role and above.
Any ideas? Are there any settings under Sharing Settings or anything in the community settings that need to be tweaked?

Thanks