Hi, I`m using crm2016, using Javascript am trying to do a web page that creates an account. Please guide me.
*This post is locked for comments
Hi, I`m using crm2016, using Javascript am trying to do a web page that creates an account. Please guide me.
*This post is locked for comments
Use Custom Action to create a account record. Create a HTML page and Global Action with one input parameter (Entity type). Call this action using JavaScript to create account record.
Hi Jhon,
The html looks fine, please share the javascript code which will trigger on click of the button in the form
Thanks
Nidheesh Cp
I have this form...
<html>
<head></head>
<body>
<title>Account</title>
<meta name="robots" content="noindex, nofollow">
<script src="/WebResources/ClientGlobalContext.js.aspx"></script>
<script src="rgomez16.dynamicsxrm.ca/.../wgarcia_JQuery" type="text/javascript"></script>
<script src="rgomez16.dynamicsxrm.ca/.../wgarcia_common" type="text/javascript"></script>
<script src="rgomez16.dynamicsxrm.ca/.../wgarcia_SDK.MetaData" type="text/javascript"></script>
<script src="rgomez16.dynamicsxrm.ca/.../wgarcia_Register" type="text/javascript"></script>
<link href="rgomez16.dynamicsxrm.ca/.../wgarcia_Ubuntu" rel="stylesheet">
<div id="first">
<form id="registrationForm">
<h1>New Account</h1>
<label class="one">
<span>Account Name :</span>
<input name="accountName" class="name" id="txtAccountName" required="" type="text" value="">
</label>
<br>
<br>
<input name="dsubmit" class="submit" onclick="ArchFn.CreateContact()" type="button" value="Save">
</form>
</div>
</body>
</html>
I´m just going to save one parameter, the name.
Hi Jhon,
Please refer the link given below for a quick boost to your scenario implimentation, "this is how you can host custom controls in Dynamics CRM Form",
https://arunpotti.wordpress.com/2014/11/30/html-webresource-example-in-crm/
Thanks
Nidheesh C P
Yes, inside.
The form has to parts, one is a textbox with the name and the other, a control with a few options.
Where is your web page residing? Is it inside of CRM (Web Resource), or external to the application?
If inside of CRM, the link that Alex provided will solve your problem.
If external to CRM, your will need to get a token/authenticate against CRM before running on commands against it.
Since you are using CRM 2016, you have the option of using WebApi to create the account record and include authentication. Check out the XRM.Tools.CRMWebAPI library by David Yack available on GitHub (which includes integration with Azure Active Directory and Authentication libraries):
github.com/.../Xrm.Tools.CRMWebAPI
Hope this helps.
Hi,
google to the rescue?
www.jasonbenedetti.com/.../dynamics-crm-2016-create-record-with-javascript
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156