hey everyone
i am Nitesh i am learning Dynamic crm 365 from one and half month i mean i am in still in running phase will you please help me?
my question is :- can we add html control on ribbon button and get the input from html control and put that in particular field .
i got answer yes so i tried but i get some error will you please check and let me know as soon as possible
i have create a simple web resource name new_nitesha it is html rght and i have called it using javascript
1)this is my html file
html><head>
<script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
<script type="text/javascript">
function startSample() {
try {
var a=window.parent.Xrm.Page.getAttribute("new_jobtitle").getValue();
a.setValue("fsdh");
}
//parent.Xrm.Page.data.entity.attributes.get("new_jobtitle").setValue("datat");
}
catch (e) {
Xrm.Utility.alertDialog(e.message);
}
}
</script>
<title>
simple page for crm
</title>
<meta>
<meta>
<meta>
<meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta></head>
<body style="overflow-wrap: break-word;">
<h1>Insert Data into contact field</h1>
jobtitle:-<input type="text" id="data"><br>
<input type="submit" value="submit" onclick="startSample();">
</body></html>
2)this is my javascript file
function Plan(){
var windowOptions = { height: 400, width: 400 }
Xrm.Navigation.openWebResource("new_nitesha",windowOptions);
}
note:-i have used ribbon workbench 2016 to add button on ribbon and i have added one command that is action in this action i have add javacript which is below and published
please check and let me know the same
thank you!
Regards,
Nitesh Devghare
*This post is locked for comments