Activity Forums Salesforce® Discussions Remove 'updated' from users in Account object through batch apex.

  • Saurabh

    Member
    April 17, 2017 at 1:56 pm

    Hi Manpreet

    As far i understand your problem you can try to Run the below code in developer console

    List<Account> acc =[SELECT Id, Name FROM Account];
    for(Account a : acc)
    {
    a.Name = a.Name.removeEnd('Updated');
    update a;
    }

    Hoping it will help you:

     

  • Parul

    Member
    September 22, 2018 at 11:47 am

    HI

    Run the below code in developer console

    List acc =[SELECT Id, Name FROM Account];

    for(Account a : acc)

    {

    a.Name = a.Name.removeEnd(‘Updated’);

    update a;

    }
    (Top 30 Salesforce Apex Interview Questions and Answers Pdf)
    16. How do you pass the parameters from on apex class to another to another ?
    Answer: You can simply pass the parameters through the URL.

    say you are redirecting from one VF page to another

    string value = ‘your param value’;

    string url;

    url = ‘/apex/VF_Page_Name?param1=’ + value;

    PageReference pageRef = new PageReference(url);

    pageRef.setRedirect(true);

    return pageRef;

    Then in the controller of the VF page, you just can get the param like this

    String param_value = system.CurrentPageReference.GetParameters().get(‘param1’);

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos