Changing Save Button Functionality in OTB Form Widget

Mike S3
Giga Expert

I would like to change the OTB save button functionality on the form widget to a submit function if the state of the record = draft. I currently have a UI action  created for this and was wondering if there is anyway to call that UI action for this button .  

      <button ng-if="getPrimaryAction()" type="submit" ng-click="triggerUIAction(getPrimaryAction())" ng-disabled="submitting" class="btn btn-primary action-btn pull-right" gsft_id="{{::getPrimaryAction().sys_id ? getPrimaryAction().sys_id : ''}}">${Save} <span ng-if="saveButtonSuffix">(${{{saveButtonSuffix}}})</span></button>
1 REPLY 1

Ct111
Tera Sage
Hello, Chk this link for reference. https://community.servicenow.com/community?id=community_question&sys_id=db631ec7db561fc02328f3231f96195e