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,
google to the rescue?
www.jasonbenedetti.com/.../dynamics-crm-2016-create-record-with-javascript
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.
Yes, inside.
The form has to parts, one is a textbox with the name and the other, a control with a few options.
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
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>
<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.
The html looks fine, please share the javascript code which will trigger on click of the button in the form
Nidheesh Cp
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
UllrSki 2
ED-30091530-0 1