• Vijayakumar Kenchugundu
  • NEWBIE
  • 35 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 12
    Replies
Hi Friends,
I am getting this error (in the subject) in an Apex class which is called by an Apex Trigger. Not sure whether this SOQL in Apex Class is correct or not. Please help me to fix this:

public static Id AGENCY_RT_ID = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
List<Account> onlyTradBranches = new List<Account>();
List<Id> accountIds = new List<Id>();
accountIds.add(account.Id);
onlyTradBranches = [SELECT Id,Office_Type__c,Status__c,RecordTypeId FROM Account WHERE RecordTypeId =: AGENCY_RT_ID AND ParentId IN : accountIds AND  Office_Type__c =: 'Traditional Branch' AND Status__c IN : ('Active', 'Pending')];

Many thanks in advance.
Vijay
Hello Friends,

Hope you are doing well. I have created a process builder on Account object for two events:
1st event: Child account create/update should fetch few fields info from it's Parent account
2nd event: Parent account update should cascade down all common fields on child account.

If I have 1st event scnario only, it works fine.
But in case of 2nd event sceanrio, Parent update event calling child update event and its exceeding Apex CPU governor limit (see the below image for error). This is only happening when a parent account has more than 200 child accounts. Is there any option in process builder to avoid this recursive update. 
Your thoughts are highly appreciable.
User-added image
Thanks
Vijay
Hello friends,
I need to make Account Name field on Account page layout read-only for Ownership (picklist value) of Public. Any thoughts how to do this without using VisualForce page customization?

Thanks in advance.
Vijay
Friends,
I have a scenario to create AccountContactRelationship (with Contact Role as Owner) when a specific (Owner) type Contact associated to an Account. But before creating, I need to first check existance of Contact Role (contact role value specifically Owner). I am using Flows to address this requirement. But I have issue with I use Contains operator on the Roles field on AccountContactRelation object. It doesn't consider it as INCLUDES, instead it takes as LIKE. So, it errored out while reading. Please check attached the below image for my logic to fetch existing Owner Contact Role. Is there any better and easy solution than using loops?
And also one more, I do have to delete record in case if owner Contact is removed from Account. How do I use condition to delete specific Contact Role (Owner)? Because it is hard to parse ; separated Roles field to pick Owner role. Your thoughts on this need is much apprecited. Thanks in advance.User-added image
 
Hello Friends,

Your thoughts on my issue is highly appreciable. 
The scenario what I am trying to do here using Process Builder is updating child accounts when there is update on Parent account.
I have a custom picklist field Org Type (not used global picklist value set) on Account object. I am trying to set this value to all child accounts in the hierarchy where there is update the same field on Parent account.
I tried all these methods.
1st: I tried directly mapping field reference field [Account].Parent.Organization_Type__c to child account field. 
2nd: Used a formula with CASE (shown below) using both TEXT([Account].Parent.Organization_Type__c) and withouth TEXT. 

CASE(TEXT([Account].Parent.Organization_Type__c),
"Sole Proprietorship", "Sole Proprietorship",
"Partnership", "Partnership",
"Unincorporated", "Unincorporated",
"Limited Liability Company", "Limited Liability Company",
"Other", "Other",
"")

The issue is the custom picklist field update on Parent is not at all updating on child records. Am I doing something wrong here?
Friends,
I have written a validation rule on Account object to stop saving if Account record type id is of certain type. I know it is advisable to use RecordTypeId instead of RecordType.Name. Here is my validation rule formule:
IF( RecordTypeId = "0122i000000613oAAA",
true,
false)

It is not stopping Saving the record if the recordtypeid is 0122i000000613oAAA. It is very strange. Any thoughts to overcome this are highly appreciable.
Friends,
I am trying to create LWC using VS Code. I am getting weird error msg.
"""Command 'SFDX: Create Lightning Web Component' resulted in an error (command 'sfdx.force.lightning.lwc.create' not found)"""
I tried to updating SFDX and uninstall/install Lightning Web Components extender. Still issue did not resolve. 
Thoughts to resolve my issue are much appreciated.
Hello, I am new to Salesforce development. I am learning by following trailhead modules. I am stuck with the module "Use Visual Studio Code for Salesforce Development". I have successfully installed SF CLI, VSC and created sample class AccountController as per steps given in the module. It successfully deployed to the newly created Playground Org. The issue I have is when I click verify step on trailhead module, it gives me below error msg. Can someone help me to clear this roadblock?User-added image

There was an unhandled exception. Please reference ID: GZHMMDZE. Error: Restforce::ErrorCode::InvalidType. Message: INVALID_TYPE: sObject type 'ApexClass' is not supported.
Hello Friends,

Hope you are doing well. I have created a process builder on Account object for two events:
1st event: Child account create/update should fetch few fields info from it's Parent account
2nd event: Parent account update should cascade down all common fields on child account.

If I have 1st event scnario only, it works fine.
But in case of 2nd event sceanrio, Parent update event calling child update event and its exceeding Apex CPU governor limit (see the below image for error). This is only happening when a parent account has more than 200 child accounts. Is there any option in process builder to avoid this recursive update. 
Your thoughts are highly appreciable.
User-added image
Thanks
Vijay
Hello friends,
I need to make Account Name field on Account page layout read-only for Ownership (picklist value) of Public. Any thoughts how to do this without using VisualForce page customization?

Thanks in advance.
Vijay
Hello Friends,

Your thoughts on my issue is highly appreciable. 
The scenario what I am trying to do here using Process Builder is updating child accounts when there is update on Parent account.
I have a custom picklist field Org Type (not used global picklist value set) on Account object. I am trying to set this value to all child accounts in the hierarchy where there is update the same field on Parent account.
I tried all these methods.
1st: I tried directly mapping field reference field [Account].Parent.Organization_Type__c to child account field. 
2nd: Used a formula with CASE (shown below) using both TEXT([Account].Parent.Organization_Type__c) and withouth TEXT. 

CASE(TEXT([Account].Parent.Organization_Type__c),
"Sole Proprietorship", "Sole Proprietorship",
"Partnership", "Partnership",
"Unincorporated", "Unincorporated",
"Limited Liability Company", "Limited Liability Company",
"Other", "Other",
"")

The issue is the custom picklist field update on Parent is not at all updating on child records. Am I doing something wrong here?
Friends,
I have written a validation rule on Account object to stop saving if Account record type id is of certain type. I know it is advisable to use RecordTypeId instead of RecordType.Name. Here is my validation rule formule:
IF( RecordTypeId = "0122i000000613oAAA",
true,
false)

It is not stopping Saving the record if the recordtypeid is 0122i000000613oAAA. It is very strange. Any thoughts to overcome this are highly appreciable.
Friends,
I am trying to create LWC using VS Code. I am getting weird error msg.
"""Command 'SFDX: Create Lightning Web Component' resulted in an error (command 'sfdx.force.lightning.lwc.create' not found)"""
I tried to updating SFDX and uninstall/install Lightning Web Components extender. Still issue did not resolve. 
Thoughts to resolve my issue are much appreciated.
Hello, I am new to Salesforce development. I am learning by following trailhead modules. I am stuck with the module "Use Visual Studio Code for Salesforce Development". I have successfully installed SF CLI, VSC and created sample class AccountController as per steps given in the module. It successfully deployed to the newly created Playground Org. The issue I have is when I click verify step on trailhead module, it gives me below error msg. Can someone help me to clear this roadblock?User-added image

There was an unhandled exception. Please reference ID: GZHMMDZE. Error: Restforce::ErrorCode::InvalidType. Message: INVALID_TYPE: sObject type 'ApexClass' is not supported.

Hi Guys,

 

          I need help for a functionality in VF page to hide one of two fields based on picklist value in the same page.

 

             Here we have :     1)Opportunity type (PICKLIST) with options NEW, EXISTING.

                                            2)Opportunity LookUp

  3) Opportunity Name Text Field

 

Here, i need to disable the Opportunity Lookup if the picklist value is NEW. Sameway, i need to disable Opportunity Name text field, if the piklist value in EXISTING

 

                                 Please let me know whether i can do this or not,  suggest me the code to disable appropriate fields in my custom object's new record page.

 

 

   Tons of Thanks,

Nishanth.