Change owner script

From SmartWiki
Revision as of 14:57, 20 March 2009 by Cameron (talk | contribs)

Jump to: navigation, search

Change Owner Browser Script

Use this browser script to force the owner to the person editing the level one as per the status.

 function changeOwner(){
 var frm=document.form1;
 if (frm.stageid.value=='1829')
   {
      frm.ownerid.value=@me.userid@;   
   }
 }
 changeOwner();

In this example the 'stageid' represents the status in this case its 'web' status. It will then change the ownerid to the current person editing it. The owner id can be hard coded to represent a constant contact by putting 'frm.ownerid.value=userid'. Where userid='actual userid' for the user.