Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

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

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