how to ignore subject field or define a default value for it,in a Microsoft dynamic crm Activity form

I create a new Activity in Microsoft dynamic CRM for sending SMS. but i dont need the “Subject” field in Activity Form and want to ignore it.

I tried to hide the subject field but is require field.

first i deselect the visible by default option in field property. after publish the customization i open the form and subject field has been hide. but when i pressed the Save button, activity form alert me You must provide a value for Subject. and show subject field.

how can i ignore Subject or define a default value for it?

Comments 1

  • You just need to change the requirement level.
    On the form designer double click on the field. This will show you the Field Properties where the Visible by default checkbox is.

    Click on the Details tab and then click the Edit button.

    Here you can set the Requirement Level from Business Required to No Constraint.

    Now you can hide the field from your form.

    Save and Publish your customizations.

    Your other option is using JavaScript.

    On Load of the form you could use the following:

    // Change the required level
    Xrm.Page.getAttribute("subject").setRequiredLevel("none");
    

    On Save you could use the following:

    // Set a default value
    Xrm.Page.getAttribute("subject").setValue("This is your default value");
    

发表评论

电子邮件地址不会被公开。 必填项已用*标注