• DewdropFresh
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hi,

 

We have a custom button on Standard Account page. On click of that button we are showing user a visualforce page in a pop-up window. We have a javascript code written in that vf page which will close the popup window and refreshes the parent window. This is working fine on firefox but in IE8 instead of refreshing the parent window it is opening a new window.

 

function refresh(accID)
{
   var parent= window.opener;
   parent.location.href='/'+accID;
   window.close();
   return true;
}

 

accID-> is the accountid  selected by the user in popup window.

 

Any suggestions.

  • September 20, 2011
  • Like
  • 0

I have a function to programmatically create tasks:

 

    public static ID createTask(SObject taskObject, String subject, String priority,
                                String description, ID assignedToId) {
        Task theTask = new Task();
        theTask.WhatId = taskObject.Id;
        theTask.Subject = subject;
        theTask.Priority = priority;
        theTask.Description = description;
        theTask.OwnerId = assignedToId;
        insert theTask;
        return theTask.Id;
    }

 

How do I also create a companion email that is sent immediately similar to the behavior of the 'Send Notification Email' checkbox on the new task UI page?

 

Thanks!


Dave

 

  • May 27, 2010
  • Like
  • 0