Questions tagged [hierarchy]

Hierarchical relationships, i.e. Account, Case, User, Campaign hierarchies.

Filter by
Sorted by
Tagged with
6
votes
1answer
3k views

Avoiding SOQL limits in a recursive method

I have a SOQL query in a recursive FOR loop. It didn't give me SOQL limit issues on my test data, but apparently we have a managed package whose Apex is hitting the limit due to this code. public ...
5
votes
1answer
422 views

Structuring content inside Knowledge

After a product demo with the Salesforce crew and also some poking around other companies’ help sites I’m coming to the conclusion that it’s difficult to publish content (or Articles) in a hierarchy. ...
4
votes
1answer
3k views

Trigger to update child with parent values

I currently have this trigger which updates the Parent of the record being saved with field values from the GRANDparent of the record being saved : trigger updateParentwithGrandparent on ...
4
votes
1answer
396 views

Programmatic Access to "Grant Access Using Hierarchies"?

Is there any way to retrieve the "Grant Access Using Hierarchies" setting programmatically (i.e. through Metadata, SOQL, or other means)? I am referring to the checkbox next to each object under ...
3
votes
2answers
7k views

Account hierarchy with variable levels of parents

We have a requirement for some account to have variable levels of parent accounts. Currently the salesforce account hierarchy only accommodates 2 levels of parents (grandparent, parent). Is there a ...
3
votes
1answer
3k views

Account Hierarchy - Trigger - Update All Accounts in Hierarchy

I have following requirement in hand - Update each account's field count__c in the Account Hierarchy. where count__c = Count_of_Custom_Object_Records on Account + count from all Accounts who are ...
3
votes
4answers
2k views

Need a custom field Grand parent Account which has highest level of account heirarchy

I need to create a custom field "Grand parent account" which has the highest level of account hierarchy. Maximum child records can be up to 500 as per salesforce. So,how can i get grand parent account ...
3
votes
1answer
302 views

Apex example code to create, get and update user settings?

<Long intro that can be skipped> I have a VFP that displays output from a standard controller. It's a very simple setup with nothing particularly difficult in it however it does allow the user ...
3
votes
3answers
738 views

Users hierarchy

I can't find how to create an Users hierarchy. I have several users in SalesForce and I want to create a hierarchy. For example, I will have Developers and Manager. I want to attach some Developers to ...
3
votes
2answers
2k views

Visualizing Many to Many relationship between Accounts (as Network-Structure not as Tree)

I have a many-to-many relationship between accounts. Somewhat like below: A B | | |_| C |____ | | | D E F I want to give the user a nice hierarchical view to see all the parents (including ...
3
votes
1answer
257 views

Can the My Domain feature support multiple domains

Salesforce Org has two companies using it - where one is a wholly owned subsidiary of the other. We now need to enable My Domain for Lightning components to work and have a business request that we ...
3
votes
0answers
192 views

Show direct ancestors/descendents only, not siblings/aunts/uncles/cousins

I used unmanged package account inline hierarchy from appexchange : https://appexchange.salesforce.com/listingDetail?listingId=a0N300000016chCEAQ and tweaked the code to use it for custom object. ...
2
votes
1answer
1k views

Cascade delete records

I have one object, for example Area. It has two lookup relationships to itself, Parent__c, Child__c. In result I can create record with Parent and Child parameters. I am trying build hierarchy. And ...
2
votes
1answer
1k views

How to deal with Activities in a Case Hierarchy?

Let's consider a Case in the service sense of the word - a caller calls up with a situation ("My printer's broken."). Now, maybe the caller calls up about more than one situation ("My ...
2
votes
1answer
459 views

Unit Testing Complex Account hierarchies w/o SeeAllData

I need to write some unit tests for a project that involve some complex account hierarchies where most, if not all are related to some kind of master account or parent account that I can't create from ...
2
votes
1answer
948 views

How to redirect to the standard Lightning Account Hierarchy page? [closed]

How can I add a button to the custom lightning component, which will be hidden is Account is not a part of hierarchy and, if visible, will redirect to the standard Lightning Account Hierarchy page for ...
2
votes
2answers
3k views

How can I see aggregated sales per account according to it's parent account?

Our accounts are structured into hierarchies, each can have it's own opptys. I need a report that aggregates the sales/opptys to the parent (even for a multi-tiered tree - more than 2 levels) How ...
2
votes
1answer
2k views

How do I roll up an Account Hierarchy and keep all children in sync?

Problem My org has many extremely complicated account hierarchies because of our client type. I have an ask: to stamp all accounts with sum of all of the accounts sales volumes in the hierarchy on ...
2
votes
1answer
297 views

Salesforce process builder - When removing active account from hierarchy, failed but works when added to hierarchy

I currently created a process which checks if a parent account is present, has been changed and checks if a parent field contains a certain value. If these conditions are met, update other fields in ...
2
votes
1answer
587 views

Visual Work Flow Account Hierarchy

I have a visual work flow on Accounts and I need to evaluate whether a field on the parent, sibling, or child accounts related to the account the flow was launched on is blank or not. I'm looking at ...
2
votes
1answer
232 views

Campaign Hierarchy in search layout?

Is it possible to show campaign hierarchy in the search layout? Ideally I'd like the search layout to mimic the indentation that gives a visual representation of search layout on the campaign layout ...
2
votes
0answers
69 views

Grant Access Hierarchy

I have a query on Grant access hierarchy and sharing rule. I have in my system Accounts being shared to Users through Account Share , Group and Territory. Now, I have A1 account shared to T1 ...
2
votes
1answer
273 views

Reporting Query to use in Klipfolio for 3 levels deep case hierarcy

- I have a 3 levels deep case hierarchy: Case level 1 (1.createdate, 1.closedate, 1.type, 1.subtype) | +---> Case level 2 (2.createdate, 2.closedate, 2.type, 2.subtype) | +---> Case ...
1
vote
2answers
5k views

Get a list of child accounts for any given parent account using apex [closed]

I have a requirement where i have the following need. If the account is a parent account, i need to loop and traverse through each child account and get a list of child accounts at any level deep. ...
1
vote
4answers
5k views

How to use Save Hierarchy level in Salesforce reports

Any idea about How to use Save Hierarchy level in Salesforce reports. Cannot see the option to choose this on the report. How do I see data based on roles.
1
vote
2answers
2k views

How to query the Hierarchical Relationship inside the User Object?

I want to get the Users which report to a particular user (A manager) by using the Hierarchical Relationship inside the User Object. Appreciate if someone can give an example. Small clarification: ...
1
vote
1answer
289 views

Update Parent record in hierarchical relationship

I want to be able to update parent record based on changes that I make in child record. Object A has 2 record types ABC and XYZ. And object A has self lookup. ABC is parent and XYZ is child record. ...
1
vote
1answer
657 views

How can I pull the manager's manager?

I have a request to build an approval process on a custom object and the request should be routed to the "Director" (ie, the record owner's manager's manager), and it appears the way to accomplish ...
1
vote
1answer
1k views

How can I create a hierarchy (parent/child relationship) within the same object?

I have custom object Territory that can have a parent Territory and child Territory. For example, Territory "United Kingdom" with child territories "Scotland", "Wales", "North Ireland" etc. Each of ...
1
vote
1answer
203 views

Trigger not working, not able to understand the concept of list map

I am building a trigger on an object called project board. so whenever a record is updated/inserted I want it to fire. It is linked to another object called project. So what I want is to count all the ...
1
vote
1answer
93 views

Custom Hierarchy field not available from Approval Process Step

In my org There are 15 fields of type "Hierarchy" on the User object. Out of these, one is the standard Manager field, and the rest 14 custom. I have an approval process where I need to ...
1
vote
1answer
170 views

Error message installing App from AppExchange [closed]

I am tryin to install the App "Any Record Hierarchy" (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G12hNUAR) from AppExchange on my Sandbox, but i get an error: ...
1
vote
1answer
105 views

Query for parent in hierarchy

Trying to query the main parent in the hierarchy. I have a case whose related account is a child of another account in hierarchy. Can someone please suggest how to query for the main parent in the ...
1
vote
1answer
3k views

Account hierarchy in salesforce

We have school district offices that have numerous buildings such as high schools, middle schools, and elementary schools underneath them. We need a way to assign the district office as the Parent ...
1
vote
0answers
61 views

Get 10+ level category hierarchy relationship

Needs to get the category hierarchy from top to bottom Which mean we have c1 code from c1 needs to get c1-->c2-->c3-->c4--> etc,. I have an 'category' object it stores all the category ...
1
vote
1answer
486 views

Can we add static resource image in lightning treegrid?

COMPONENT: <lightning:treeGrid columns="{! v.gridColumns }" data="{! v.gridData }" keyField="name" expandedRows="{! v.gridExpandedRows}" aura:id="mytree" /...
1
vote
1answer
96 views

Auto-numbering for Self-Lookup Hierarchy of Records

Context: I have an Object named Objective__c which has a lookup field to itself named "Parent Objective". I also have a field named "Level" which has 4 types of levels. Using these 2 fields, a user ...
1
vote
0answers
66 views

Stop at 1 level while traversing account hierarchy using parent accounts

I have an interesting requirement. The requirement is that if an account is a parent account and a custom field is changed say account manager field, then immediately update the children of the parent ...
1
vote
0answers
25 views

Report with a wrong Territory View

I created a custom Report Type "O-p-p". A report X with the "O-p-p" custom Report Type. When I build the report I cannot see any row, because it is set with a certain territory point of view in the ...
0
votes
2answers
2k views

Hierarchy diagram in Lightning

Has anyone ever tried to create a role hierarchy type relationship logic in Lightning with similar visualization of the hierarchical diagram? I've a VF page where the same has been done using a JS ...
0
votes
2answers
359 views

Comparing account.parentId SOQL

Is it possible to to compare the parent id of an account to another account? i.e. SELECT Id from Account WHERE child_account.parentId = parent_account.Id; I keep getting the 'Unknown Error parsing ...
0
votes
2answers
242 views

How to create multiple test custom setting hierarchy

I am not sure how to create multiple profiles for one hierarchy custom setting. I assume it would look something like this: ConcurrentSessionsPolicyLimit__c defaultLimit = new ...
0
votes
2answers
848 views

Retrieve the subscribers from each business unit

Starting from the All Subscribers list of the parent business unit, I'm trying to know which subscribers are being part of each child business unit. As it is not defined any Subscriber Filter, how ...
0
votes
1answer
25 views

Get all child recrods

I have object Sales with self relationship. I want to ger Parents and all Child, but it has multiple level hierarchy. To get Parent i just search for recotd with Parent__c = null. To get Child i ...
0
votes
1answer
94 views

Question About Decrementing Numbers

My class that utilizes this LREngine utility class aggregates numbers up a hierarchy. The problem I'm facing is that when an account is deleted the number fields are not subtracting values from the ...
0
votes
1answer
30 views

Selecting a hierarchy column from the same object

I have a query I've written for the Organization/Account object SELECT ID, Name, BillingStreet, BillingCity, BillingState, BillingPostalCode, County__c, Phone, ParentId FROM Account This ...
0
votes
1answer
318 views

What is better - self relationship or custom object?

I need to relate Opportunities to other Opportunities. What is the best way to go about this? Lookup to itself? Create a custom object for a many to many relationship between Opps? Eg a potential ...
0
votes
1answer
25 views

I want to make the task in Activity visible to the parent object of the parent

There is a task registered in the Contract record. Contract refers to Opportunity as Lookup. So I want to show Contract's task in the Lookup Opportunity. Is there a way?
0
votes
0answers
74 views

Enable Super User Access for Customer Community Plus User

We inherited an org that have a customer community with a set of Customer Community Plus licenses, where Accounts follow a hierarchical organisation of 4 levels. Each account can have 2 levels of ...
0
votes
0answers
27 views

How to restrict users from viewing not more than 2 level Account Hierarchy

What configuration changes should be made so that a user should be able to view 2 level account hierarchy after he/she clicks on Hierarchy Icon?