• Bertrand Polus
  • 10 Points
  • Member since 2015
  • Senior Consultant
  • Globalway

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 9
I have been asked to create an Email Alert for the Opportunity Owner and his/her boss when an opportunity has remained in a stage for 30 days, then another alert, when time in stage = 60, and so on. Can you please help or advise a workaround.

I have tried to specify the ISCHANGED function, but the picklist would not accept this function. 

Could you let me know about this please.

I want to schedule my class to create child records 30 days after the created date of parent records, as I am beginner to Apex I have no idea to do that should I use conditions in my apex claas or somrthing else? Please suggest me how can I do that, It would be a great help. 
Hello All,

I have one custom button in custom object view details page. I want enable or disable button based on condition whether current record exits on another custom object. Is is possible ? if so please suggest some steps to do
Scenario: I hav 1 obj on that i am having all read,write,edit,delete permissions when am trying to delete that raises an error.Why?
how to hide the past dates in date picker  dynamically on standard page?

  • May 18, 2015
  • Like
  • 0
public without sharing class UpdateList {
    list<order> selectorder;
    String quoteId {set; get;}
    String selectedOrderId {set; get;}
    public List<Order> selectedOrders {set; get;}
    public Boolean orderUpdated {set; get;}
    public UpdateList(){
        quoteId = ApexPages.currentPage().getParameters().get('quoteID');
        orderUpdated = false;
    public PageReference selectOrder(){
        selectedOrderId = ApexPages.currentPage().getParameters().get('ordersRadio');
        selectedOrders = [select Id, OrderNumber, Status from Order where id=:selectedOrderId];
        return null;
    public list<Order> getorderslist()
        List<order> allords=[select Id,Ordernumber,Status from Order where quoteId=:quoteId];
        return allords;
    //call this method to update order, and copy all quote line items from quote
    public PageReference updateOrder(){
        //get selected orderId from the list   
        selectedOrderId = ApexPages.currentPage().getParameters().get('ordersRadio');

        //get quote line items using the quoteId
        List<OrderItem> orderLines = new List<OrderItem>(); 
        for(QuoteLineItem qLine : [SELECT Id, QuoteId, PricebookEntryId, Quantity, UnitPrice, Discount, Description, ServiceDate, 
                                   Product2Id, SortOrder, ListPrice, Subtotal, TotalPrice FROM QuoteLineItem where QuoteId=:quoteId]){
            OrderItem oLine         = new OrderItem();
            oLine.OrderId           = selectedOrderId;
            oLine.PricebookEntryId  = qLine.PricebookEntryId;
            oLine.Quantity          = qLine.Quantity;
            oLine.UnitPrice         = qLine.UnitPrice;
            oLine.Description       = qLine.Description;
            oLine.ServiceDate       = qLine.ServiceDate;
        insert orderLines;    
        orderUpdated = true;
         ApexPages.AddMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM,'Record updated Successfully.Thank you!'));
        return null;        
The log on my developer console stoped to record activities.
I ran a Apex Code on the anonyms window last time when I had the same issue, and it fixed the issue (I read this on a forum). But not this time.
Can anyone help me fix it?