tips & tricks


Calendario
aprile 2024
lmmgvsd
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Jscript per risalire alla ParentForm

JSCRIPT  PARENTFORM

Se aggiungo un bottone alla griglia di un'entità, per accedere alle proprietà dell'entità stessa con il jscript del bottone che ho aggiunto devo risalire al parent.

var parentForm = window.parent.document.crmForm;

 

 

// JScript source code

    var msg = "Form type = " + formType +

            "\r\nObject Type Name = " + parentForm.ObjectTypeName +

            "\r\nObject Type Code = " + parentForm.ObjectTypeCode +

            "\r\nObject Id = " + parentForm.ObjectId;

 

    alert(msg);

 

    if (parentForm.ObjectTypeName == "account") {

        msg = "Account name = " + parentForm.all.name.DataValue +

              "\r\nCustomer Type = " + parentForm.all.customertypecode.SelectedText;

 

        alert(msg);

    }


Categoria: CRM 4.0
lunedì, 06 lug 2009 Ore. 15.23
Archivio Posts
Anno 2020

Anno 2018

Anno 2015

Anno 2013

Anno 2011

Anno 2010

Anno 2009

Anno 2008
Statistiche
  • Views Home Page: 13.370
  • Views Posts: 56.119
  • Views Gallerie: 2.837
  • n° Posts: 117
  • n° Commenti: 1
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003