MSCRM 4.0 Form Properties

Do pól formularza odwołujemy się poprzez obiekt crmForm:

[js]
crmForm.propertyname
[/js]

Tabelka poniżej przedstawia dostępne właściwości.

Właściwość Typ Opis
IsDirty bool Określa czy formularz był modyfikowany
FormType int Tylko do odczytu. Typ formularza.Możliwe wartości:

  • Undefined Form Type = 0
  • Create Form = 1
  • Update Form = 2
  • Read Only Form = 3
  • Disabled Form = 4
  • Quick Create Form = 5
  • Bulk Edit Form = 6
ObjectId string Tylko do odczytu. Identyfikator encji. Jeśli formularz jest w trybie edycji
ObjectTypeCode string Tylko do odczytu. Kod typu encji którą edytujemy/wyświetlamy na formularzu
ObjectTypeName string Tylko do odczytu.  Nazwa typu encji której dotyczy formularz
all.{field name}  Kolekcja poszczególnych pól formularza odpowiadającym polom w encji lub IFRAME formularza.

Przykład

[js]

var CRM_FORM_TYPE_CREATE = 1;
var CRM_FORM_TYPE_UPDATE = 2;

// Test the FormType and ObjectId properties.
switch (crmForm.FormType)
{
case CRM_FORM_TYPE_CREATE:
alert("This is a create form.");
break;

case CRM_FORM_TYPE_UPDATE:
alert("This is an update form, the ID is " + crmForm.ObjectId + ".");
break;
}
[/js]
[js]
var CRM_ENTITY_ACCOUNT = 1;
var CRM_ENTITY_CONTACT = 2;

// Test the ObjectTypeCode property.
switch (crmForm.ObjectTypeCode)
{
case CRM_ENTITY_ACCOUNT:
alert("This is an Account form.");
break;

case CRM_ENTITY_CONTACT:
alert("This is a Contact form.");
break;
}

[/js]

Żródło: http://msdn.microsoft.com/en-us/library/cc150873.aspx

7,622 thoughts on “MSCRM 4.0 Form Properties”

  1. Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I acquire actually enjoyed account your blog posts. Anyway I’ll be subscribing to your feeds and even I achievement you access consistently quickly.

  2. Thank you for the auspicious writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you!
    However, how can we communicate?

  3. I do consider all of the concepts you’ve presented to
    your post. They’re very convincing and will certainly work.
    Still, the posts are very short for novices. May just you please extend
    them a little from next time? Thank you for the post.

  4. I am really enjoying the theme/design of your website.
    Do you ever run into any internet browser compatibility problems?
    A couple of my blog readers have complained about my site not working correctly in Explorer but looks great in Firefox.
    Do you have any advice to help fix this problem?

  5. Pretty element of content. I simply stumbled upon your web site and in accession capital to claim that I get actually enjoyed
    account your blog posts. Anyway I will be subscribing on your feeds
    and even I fulfillment you get entry to persistently quickly.

  6. Simply want to say your article is as astonishing.
    The clearness to your publish is simply cool and that i could suppose you’re knowledgeable on this subject.

    Well together with your permission let me to snatch your feed to stay
    updated with impending post. Thanks 1,000,000 and please carry on the rewarding work.

Leave a Reply