• Sajid Hussain 15
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I was trying to install the local Dev Server and when I execute this command it is throwing an error.
 
C:\Users\Desktop\Salesforce> sfdx plugins:install @salesforce/lwc-dev-server

This plugin is not digitally signed and its authenticity cannot be verified. Continue installation y/n?: y
Finished digital signature check.
error An unexpected error occurred: "https://registry.yarnpkg.com/@salesforce%2flwc-dev-server: self signed certificate in certificate chain".
Installing plugin @salesforce/lwc-dev-server... !
Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file:C:/Users/p2764490/AppData/Local/sfdx/yarn.lock --preferred-cache-folder=C:/Users/p2764490/AppData/Local/sfdx/yarn --check-files exited with code 
1
    at ChildProcess.<anonymous> (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/plugin-plugins/lib/yarn.js:31:28)

 
Hi, 

 I have a below code which will give lis of child and sub child accounts. 
 
Id accountId = '0013400001R8KXJ';

Account[] allChildren = new Account[] {};

Set<Id> parentIds = new Set<Id>{accountId};

Account[] children;

do {

    children = [select Id, Name from Account where ParentId in :parentIds];

    allChildren.addAll(children);

    parentIds.clear();

    for (Account child : children) 

      parentIds.add(child.Id);

} while (children.size() > 0);

list<Account> Act = [select id, name from account where id in :allChildren];

 for(Account A : Act){

 system.debug(a.name);       

}
Please suggest me how to write a code to get parent and grand parent list of accounts using apex. 

Thanks
Sudhir
 
  • October 09, 2017
  • Like
  • 0