• Balu_dev
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 13
    Replies

Iam getting Invalid Query Locator while running batch class, this is the query, urgent help will be appreciated..thanks

 

public string query = 'Select l.Id, l.Discount_Rollup__c, l.Car_Van_Type__c, (Select Product__c, Product_Key_Model_Discount_Level__c, Product_Key_Model__c From Line_Item_Products__r where Product_Key_Model__c >0), (Select Discount__c, Account_Id__c From Deal_Line_Items__r where deal_active__c > 0) From Line_Item__c l';

 

While running this query in eclipse and explorer no issues...but after running the batch it gives the above error.

I dont understand whether this is a bug in salesforce or we have any fix for it.. Tried checking forums and blogs but no,luck.. If anyone facing this issue and had done some fix , please share thoughts, really help me..

I am having issues including this below query in a string.

 

String Query = 'Select Id, Discount__c from item1__c Where Id'+

'IN(Select item1__c,Product__c From Item2__c where'+ 'Product__c >0)'+

'and Id IN(Select Item1__c,Account_Id__c From Item3__c where active__c >0)';

 

Urgent help will be appreciated...Thanks..

 

 

I have a batch class that runs the update on account records. I get an error First error: Too many DML statements: 151..       I have only one update statement, but still i dont understand why it says...please give me your email id so that I can send the code as its bit a lengthy code..Any help appreciated....

I have a custom button in standard page layout. I have to disable this button based on one field value, scenario is if the field value changes to expected value this button  should be visible only to users of one profile and be disbled for others users? Can somebody quickly suggest , how to achieve this ?

I want to know that after deploying Application Changes to production, Suppose if I want to go back to its previous configuration then what are the steps to be followed ?

Is there a way I can customize multiple workflows on a single object by giving sequence(numbering) so that i can have control of which workflow to execute first ??


What are the different methodology through which we can achieve this?

 

Please help ASAP..

Is there a way I can customize multiple workflows on a single object by giving sequence(numbering) so that i can have control of which workflow to execute first ??


What are the different methodology through which we can achieve this?

 

Please help ASAP..

 

Thanks.

Here the Parent and Child Objects are Account(Standard) object itself, having one parent(Account) to many Child(Accounts)..i have to check a particular field value of parent as well as the same fields in all child accounts..how do i proceed ???

There is an One-to-Many Parent-child relationships in Account object.. I am retrieving all the Parent Accounts from trigger.new and putting it in a set..now for every parent  i have to retrive its child accounts and update both parent and its child,,please help me as soon as possible...

          

In an account object we have ParentAccount field which creates parent-child relationships within account records. I have to update both parent and child accounts using some logic..tried few things..but did not work out.. What i did in the code is separated parent and child account records, then for every parent account record, i had to query its related child accounts as i have to check if any of its child account as well the parent account has the field value ""account class = customer''"" if so then update other field of parent and its child account records.....

 

PROBLEM is control is not going beyond below mentioned line in my code :

 

checkChildren=select id,name,Marketing_Account_Class__c, Account_Class__c from Account where parentid=:ParentAccId]; 

 

 can any body give an idea about this ??

 

here is my code:

 

 

        global void execute(Database.BatchableContext bc, sObject[] objects)

        {

          

            system.debug('list of ACCOUNTS :'+ objects);

      

       

            list<Account> theseAccounts = new list<Account>();

            Account a;

   

            for(SObject so : objects)

            {

                a = (Account)so;

                system.debug('First Account:' +a);

                if(a.ParentId == null)

                {     

                   Parentaccs.add(a.Id);

                   system.debug('Parent Account:' +a.Id);

                      

                 

                }

                else

                {

                  Childaccs.add(a.Id);

                }

                          

                theseAccounts.add(a);

            }

            list<Account> Parentaccounts= [select id,name from account where id IN :Parentaccs];

       

         for(account ac : Parentaccounts)

        {

                           

               ParentAccId= ac.id;

              checkChildren=[select id,name,Marketing_Account_Class__c, Account_Class__c from Account where          parentid=:ParentAccId];

                          

               if(checkChildren.size()>0)

                  {

                                            

                      if(ac.Account_Class__c=='Customer')

                        {

                           accountstoupdate.add(ac);

                            ac.Marketing_Account_Class__c='Customer';

                         

 for(account child :checkChildren)

                            {

                               child.Marketing_Account_Class__c='Customer';    

                               accountstoupdate.add(child);

                            }

                               }

                       

                       

                        else if(ac.Account_Class__c!='Customer')

                        {

                            for(account child :checkChildren)

                            {

                                if(child.Account_Class__c=='Customer')

                                {

                                    for(account act :checkChildren)

                                    {

                                        accountstoupdate.add(act);

                                         act.Marketing_Account_Class__c='Customer';

                                     }

                                    Update accountstoupdate;

                                    ac.Marketing_Account_Class__c='Customer';

                                    accountstoupdate.add(ac);

                              

                                }   

                            }

                               

                                                       

                        }   

                 }

            }   

            update accountstoupdate;

        

       

       }

      

      

      

Iam getting Invalid Query Locator while running batch class, this is the query, urgent help will be appreciated..thanks

 

public string query = 'Select l.Id, l.Discount_Rollup__c, l.Car_Van_Type__c, (Select Product__c, Product_Key_Model_Discount_Level__c, Product_Key_Model__c From Line_Item_Products__r where Product_Key_Model__c >0), (Select Discount__c, Account_Id__c From Deal_Line_Items__r where deal_active__c > 0) From Line_Item__c l';

 

While running this query in eclipse and explorer no issues...but after running the batch it gives the above error.

I dont understand whether this is a bug in salesforce or we have any fix for it.. Tried checking forums and blogs but no,luck.. If anyone facing this issue and had done some fix , please share thoughts, really help me..

I am having issues including this below query in a string.

 

String Query = 'Select Id, Discount__c from item1__c Where Id'+

'IN(Select item1__c,Product__c From Item2__c where'+ 'Product__c >0)'+

'and Id IN(Select Item1__c,Account_Id__c From Item3__c where active__c >0)';

 

Urgent help will be appreciated...Thanks..

 

 

I have a custom button in standard page layout. I have to disable this button based on one field value, scenario is if the field value changes to expected value this button  should be visible only to users of one profile and be disbled for others users? Can somebody quickly suggest , how to achieve this ?

There is an One-to-Many Parent-child relationships in Account object.. I am retrieving all the Parent Accounts from trigger.new and putting it in a set..now for every parent  i have to retrive its child accounts and update both parent and its child,,please help me as soon as possible...

Folks,

I got my DEV 401 few months back. I am now planning to take up the DEV 501 exam. Though I've been working in Visualforce & apex for quite sometime, I don't have a clue on what is being tested in DEV 501. Couple of people to whom I have spoken recently are also in the same state. 

 

Hence, I am starting this thread so that people who have taken 501 atleast once, can share with us their experience and guide/hint us on the reference materials/topics that matter.

 

Lets help each other !!!

 

P.S: I also wanted to declare that this thread is not meant to post the exam questions as it will violate salesforce.com certification rights. This thread is solely meant to share the certification exam experiences and references.