Hi,
I have a problem with "Create Invoice" button. When I click it and my invoice created, it isn't disabled.So we can have so many related invoice and it is bad. I want to be disabled it, when first invoice was created and no one can click it again.
I used javascript but it is disabled just during the creating invoice and after that it is enable.
Please help me
This is my code:
function FrmOnSave(prmContext) {
// Local variable to store value indicating how the save event was initiated by the user.
var wod_SaveMode, wod_SaveEventVal;
// Change the Save Event Value as per required Save Event
wod_SaveEventVal = 19;
if (prmContext != null && prmContext.getEventArgs() != null) {
wod_SaveMode = prmContext.getEventArgs().getSaveMode();
if (wod_SaveMode == wod_SaveEventVal) {
var buttonID = "salesorder|NoRelationship|Form|Mscrm.Form.salesorder.MainTab.Actions-LargeMediumLarge-0";
var btn = window.top.document.getElementById(buttonID);
if (btn) {
btn.disabled = false;
}