locked
Owner Lookup RRS feed

  • Question

  • Hi All,

    I was wondering if anyone knows how to do this or even if this is possible...

     

    I have an application that converts from a custom entity to a Lead.  The Lead has an Owner field that has a lookup button to be able to change ownership.  The owner lookup button pops up a dialog called Confirm Assignment and you are able to select an Owner.

     

    Is there a way to make the Confirm Assignment dialog popup through asp.net, xml or javascript code?  I want to be able to have the option to change the ownership directly after converting from a custom entity to a Lead.  I don't want to go through the Tabs to get to the Owner field and change it from there.

     

    Any help would be appreciated. Thanks,

    Jinx'd

    Tuesday, April 15, 2008 8:17 PM

Answers

  • Hi.

     

    In the prospect onload event add the following line:

     

    Code Snippet

     

    function OnCrmPageLaod()

    {
         if( crmForm.FormType == 2 && !IsOwnerEqCurrentUser() )

             crmForm.all.ownerid.click();
    }

     

    function IsOwnerEqCurrentUser()

    {
         /* 

             ajax the server and get the current user < whoamirequest > guid

             and match it against the owner lookup current value...

             OR

             if the qualification is done by a pre-defined user , simply check that he's no longer the owner. 

         */

         return true;
    }

     

    OnCrmPageLaod();

     

     

     

     

    Cheers,

    Adi

     

     

     

    Wednesday, April 16, 2008 4:51 AM

All replies

  • Hi.

     

    In the prospect onload event add the following line:

     

    Code Snippet

     

    function OnCrmPageLaod()

    {
         if( crmForm.FormType == 2 && !IsOwnerEqCurrentUser() )

             crmForm.all.ownerid.click();
    }

     

    function IsOwnerEqCurrentUser()

    {
         /* 

             ajax the server and get the current user < whoamirequest > guid

             and match it against the owner lookup current value...

             OR

             if the qualification is done by a pre-defined user , simply check that he's no longer the owner. 

         */

         return true;
    }

     

    OnCrmPageLaod();

     

     

     

     

    Cheers,

    Adi

     

     

     

    Wednesday, April 16, 2008 4:51 AM
  • Hi,

    I ended up using crmForm.all.ownerid.onshowdialog(); because there was no click event.  Do you know if there's a way to check which button was pressed on the owner dialog (ok or cancel) ? 

     

    Thanks,

    Jinx'd

     

    Wednesday, April 16, 2008 7:55 PM