Crow Canyon Software Forum
Associated Items New Button
Quote from jeckard on February 7, 2021, 12:47 amI thought I would post this for anyone who might need it. If you have a case where you want to show associated items in read-only in one section of the form...but want to allow a user to add a new item in another you can do so by adding an html button to your from
Input a Line/HTML Control and put code simlar to below
<style>#NewOrderbutton{ background-color:#008CBA;
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 4px 2px;
cursor: pointer;
border-radius: 8px;}
</style>
<div style="text-align:center;"><button id="NewOrderbutton">New Order</button></div>
Then in Custom Script input
document.getElementById("NewOrderbutton").addEventListener("click", function() {
window.ccs_g_FormUI.linkItemsColumnSettings['Name of LookupColumn'].NewItem(); return false;
functionCallback(false,returnDataObj);
});
I thought I would post this for anyone who might need it. If you have a case where you want to show associated items in read-only in one section of the form...but want to allow a user to add a new item in another you can do so by adding an html button to your from
Input a Line/HTML Control and put code simlar to below
<style>#NewOrderbutton{ background-color:#008CBA;
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 4px 2px;
cursor: pointer;
border-radius: 8px;}
</style>
<div style="text-align:center;"><button id="NewOrderbutton">New Order</button></div>
Then in Custom Script input
document.getElementById("NewOrderbutton").addEventListener("click", function() {
window.ccs_g_FormUI.linkItemsColumnSettings['Name of LookupColumn'].NewItem(); return false;
functionCallback(false,returnDataObj);
});