Former_Member
8 years agoAccelerator III
OnBeforeNew - unable to get new Item
I am trying to pre-populate a property value before the create new item form is displayed. However I cant seem to get the reference of the new item, and I am using JavaScript for client event: OnBeforeNew of the Item.
var itm = this.newItem(this.getType(),"get");
alert(itm.toString());
itm.setProperty("team_id",sTeamId);
itm = itm.apply();
When I use alert to display the item fetched, it looks like getting one of the existing records? Please advise how can I achieve this.