You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Get Child Accounts from Parent Account Record

Accepted answer
17
Views
1
Comments
edited Oct 16, 2020 9:10AM in Sales 1 comment

Summary

Need to fetch list of child accounts from parent account record in groovy

Content

Need to perform update on the child account whenever parent account attribute got an update. To perform that, need to fetch list of child accounts in groovy but the appendViewCriteria is giving an error. Please tell me a way to fetch child accounts or is there any other better way to perform the update operation on child accounts

Before Update Trigger:

def ParentId = PartyId

def OrgVo = newView('OrganizationProfile')
OrgVo.appendViewCriteria("ParentParty.first().PartyId = ${ParentId}") //also tried ParentParty.PartyId = ${ParentId}
OrgVo.executeQuery()

 

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!