javascript - call a function attached to custom button on onload of CRM Form -
i trying add function each , every entity on save event. have added button application ribbon , shown on each , every entity , attached function it. have add function onsave
of form without clicking button. here function:-
function test() { alert("hello"); xrm.page.data.entity.addonsave(addmethod); } function addmethod() { alert("i added"); }
what needed add enable rule button command.
problem: need replace generic plugin registered on each , every entity update event javascript function.
solution:
created solution custom webresource , application ribbon.
with of ribbon workbench added button entity form.(button added application ribbon added each , every entity)
added enable rule return false hide button :
function enablerule() { xrm.page.data.entity.addonsave(addmethod); return false; } function addmethod() { //my logic }
and logic replaced generic plugin server side code client side code :)
i know not supported way, had anyway. told team lead it, wanted in way. so, please, no comments on that.
Comments
Post a Comment