• Sanvee Mehara
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Help with syntax for 2 WHERE Clauses please.
 
List<AggregateResult> AggregateResultList = [SELECT AccountId, Account.Name name, COUNT(Id) co,  Milestone1_Project__c.id,
                                    Milestone1_Project__c.Implementation_status__c, Milestone1_Project__c.Client_Advisor_Email__c
                                    FROM Case
                                    WHERE CreatedDate = LAST_N_DAYS:5 AND Id IN :Trigger.New
                                    GROUP BY AccountId, Account.Name
                                    HAVING COUNT(Id)  >= 8
                                    ];

 
Hi All,
I am getting following error in javascript. Please help me with this error.
 
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}   
 
var newRecords = [];   
 
var coapp = new sforce.SObject("Lead");  
coapp.id ="{!Lead.Id}"; 
coapp.Name="{!Lead.Name}" 
coapp.Rating="Hot";             
 
newRecords.push(coapp); 
result = sforce.connection.update(newRecords); 
window.location.reload();

Error: The Name field is required.

Thanks in Advance
Hello smart people,

In our Salesforce instance, we have it set up with parent accounts to be the SCHOOL, and the child account as the CLASSROOMS. We would like to have it that if the field "Active Status" of the CLASSROOM is changed to "Inactive" [picklist] for example, then the SCHOOL account will automatically be changed to "Inactive" [picklist] The School Account and Classroom Account have a master-detail relationship. 

I'm doing research and some people say I can use Process Builder for this, and some say I need to write validation rules and some say Workflow? Can you tell me which is the easiest way to accomplish this?

If it's for validation rules, what type of formula can I write? Right now, I have this below but it doesn't seem to be working?

AND(ISPICKVAL(  Active_Status__c , "Inactive"),
ISPICKVAL(  Parent.Active_Status__c , "Active") )

Thank you for all your help in advance!!