• Christopher McGee
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi folks,

I'm using javascript remote objects query as follows
 
{where:{
            or:{
                 Trainer:{in: subArray1},
                  State:{in: subArray2}
                  }
               }
 };

Each condition works seperately as desired, but when I introduct the 'or' I get a path error. Pretty certain that my syntax is correct - I'm wondering if there's an issue with 'or'-ing over 'in' the way I'm attempting. My code is such that I can break this into two queries if needed, but still wanted to know what the deal is here.

Thanks!
Hi,

I've recently set up a couple of processes in saleforce that seem to be creating multiple flow interviews and in turn duplicate records. The general set up is as follows:

1) I create a new Case Record Type and Layout
2) I create an email template.
3) I Create an email template to be used in an alert for users when a Case is  created and assigned to them if it is of the new type.
4) I create and activate an email alert that uses the template.
5) I set up a workflow rule that uses the email alert when a Case is created and assigned to a user if it's of the new Record Type
5) I create a Lightning process that fires when an Account is updated to meet a set of criteria. When it fires, it creates a new Case and assigns it to the owner of the Account. In turn this fires the email alert.

What's happening is it appears to be firing twice - creating two Flow Interviews and subsequently creating two new Case Records and sending two email alerts.

I haven't been able to pick this apart or find any related known issues at least for the Process Builder. I'm hoping someone here can point me in the right direction.
In below code showing site value is null in debug.kindly help us to resolve the issue.
@isTest
public class testOnUpdation{
static testmethod void Siteupdate()
{
Account aa = new Account (name='istest',RecordTypeId='012j0000000ogEQAAY',Site='istest');
insert aa;
System.Test.startTest();
system.debug('starttest');
Account bb= new Account(name='naugh',RecordTypeId='012j0000000qRATAA2',self__c=aa.id);
insert bb;
system.debug('site'+bb.site);//Here it is showing null value
Account cc=[select Id, name,Site from account where Id =:aa.Id];
cc.Site ='istestchanged' ;
update cc;
update bb;
System.Test.stopTest();
}