Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Convert JavaScript code form 4.0 to 2015.

(0) ShareShare
ReportReport
Posted on by 290

Hi All,

I want to convert (4.0 to 2015) below code as per MSCRM2015. Please help me.

function Form_onsave()
{
debugger;

var TYPECODE_EVENT = 3;
if (crmForm.all.typecode && crmForm.all.typecode.DataValue != TYPECODE_EVENT)
{
var clearFieldArray = new Array('msa_eventname', 'msa_publisheventdetailsonweb', 'msa_eventtopic', 'msa_eventdetails',
'msa_eventtype', 'msa_startdatetime', 'msa_enddatetime', 'msa_costofadmission', 'msa_location', 'msa_eventcontact',
'msa_eventsponsors','msa_additionalregistrationinformation','msa_eventcapacity');

for (var i = 0; i < clearFieldArray.length; i++)
{
if (crmForm.all[clearFieldArray[i]] != null)
crmForm.all[clearFieldArray[i]].DataValue = null;
}
}
}

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans