• Nitish Talekar
  • NEWBIE
  • 85 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 30
    Replies
Hi all,
I want to update custom field when an task is closed in that particular custom field. Can any one help me over here.

Thanks in advance.
regards,
mac.
i want to replace back button to Stage left navigation in salesforce1 in vf page. 
because click on back button on the top left corner in salesforce1,it goes to history.go(-1). i need to give navigation icon which shows tabs list.
Replace back button to stage left navigation button

to 

User-added image
User-added image
i want to redirect to opp record after clicking on opportunity name in salesforce1 mobile app. but getting this error while using sforce.one.navaigateToSobject(id)
while inserting account record if account having same account name and same phone number the it will show error . and if account having same account name and differenet phone then it will save .
Account has a field `Source_System__c` as its parent.

I wanna query Name, Id from Source_System

This query is workable. 
[SELECT Source_System__r.Name, Source_System__r.Id from Account]

However, I wanna have the value from Source_System can be nested in a object.
Like the sub-query's result. But it didn't work.



    SELECT (SELECT Name, Id from Source_System) FROM Account
                             ^
ERROR at Row:1:Column:30
Didn't understand relationship 'Source_System' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.



    SELECT (SELECT Name, Id from Source_System__r) FROM Account
                             ^
ERROR at Row:1:Column:30
Didn't understand relationship 'Source_System__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
i cant generate apex code after parsing any of the WSDL file
Need Help
I have a checkbox in my vf page which is using custom controller. I need to get check box value true in apex class controller when it is checked, so that I can perform my logic based on that checkbox value. How to do that?
Hi all,
I want to update custom field when an task is closed in that particular custom field. Can any one help me over here.

Thanks in advance.
regards,
mac.
Hi,
I have created one Batch Apex and scheduler class for execute on every 5 minute but this scheduler is not working , please help me 
Batch Apex --

global class BatchApexUpdateDemo implements Database.Batchable<sObject>
{

    global  Database.QueryLocator start(Database.BatchableContext con)
     {
      String query ='select Id, First_Name__c, Company__c , from User__c, Descriptiom__c';
      return Database.getQueryLocator(query);
    
     }
     
     global  void execute(Database.BatchableContext con, List<User__c> scope) {
     
         List<User__c> usrlist = new List<User__c>();
         for(User__c usr : scope )
          {
           usr.Descriptiom__c = usr.First_Name__c+' '+usr.Company__c;
           usrlist.add(usr);
          }
      
           update usrlist;
     }
     
     public void finish(Database.BatchableContext BC) 
     {
     
     
        AsyncApexJob a = [SELECT Id, Status, NumberOfErrors,
        JobItemsProcessed,TotalJobItems, CreatedBy.Email
        FROM AsyncApexJob WHERE Id =:BC.getJobId()];
        String UserEmail = 'bhushansingh226@gmail.com';
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        mail.setToAddresses(new String[] {UserEmail});
        mail.setReplyTo('rathore.bhushan22@gmail.com');
        mail.setSenderDisplayName('Batch Processing');
        mail.setSubject('Batch Process Completed');
        mail.setPlainTextBody('Batch Process has completed');
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
     }
}

Schedular class ---

global class schduleBatchOfUser implements Schedulable {

   global void execute(SchedulableContext ctx) {
     
     BatchApexUpdateDemo p = new BatchApexUpdateDemo();
      database.executeBatch(p);
      String sch1 = '0 5 * * * ?';
      
      schduleBatchOfUser sch2 = new schduleBatchOfUser();
      system.schedule('Every Hour plus 0 min', sch1, sch2);

      
   }   
}
I am trying to Schedule an class at the interval of 5 minutes but am not getting any idea how to perform it, i have seen some examples but they are not working properly please help if any body can.
I need programming interview questions for 3 years experience please help to face interview
1)When should you build solutions declaratively instead of with code?
2)What are the advantages of using Batch Apex instead of a triggers?
3)
When would you use the @future annotation?
4)when did the view state problem is raised what is the pros and cons ?
5)Write a SOQL query that counts the number of active Contacts for each Account in a set.
6)is is possible to write the apex code from userinterface?
7)Can we modify records directly in trigger.new ?
8)why use @Remote Action used before apex method?
9)How to restrict any Trigger to fire only once ?
10)
AJAX  USE In Salesforce how can call ajax in visualforce?
Hi All
can you please share interview questions and different senarios which ask for experienced sfdc developers
 
Profile & roles@owd interview questions and Answers
Recently I went to 2 onsite interviews and they asked me the same question about reports. I answered each one of them perfectly but couldnt on this one. On the other hand my mind got stucked up somewhere each time when I heard the question... does anyone here help me out with some common question you would ask in a interview for salesforce administrator. Sorry for the very vague question on question!
We recently implemented Enterprise Territory Management in our organization. I have used the "OppTerrAssignDefaultLogicFilter" apex class to display the territory name in the opportunities. When the button "Run Opportunity Filter" is clicked, the apex class populates the territory name on the  opportunities . I am observing the following issues  with the Apex class:

- Even though the account has only single territory with the maximum priority, the associated opportunity doesn't get the territory assigned
-Under the same account one opportunity gets territory assigned whereas the other opportunity doesn't get territory assigned
- I have even tried to run this class for small group of records. Still not all the records get the territory assigned.

Note: We have only one Territory model active
Hi 

pros and cons of Territory management , can any one give the clear picture on this.

Is it something like this?

 

// every 5 minutes
String sch = '0 5 * * * ? ';