tips & tricks


Calendario
aprile 2025
lmmgvsd
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

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: 16.491
  • Views Posts: 60.399
  • 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