Widget save fails with message: "Could not save record because of a compile error"

Smith Johnson
Tera Guru

Hi,

I try to add a "Delete" button on the widget "Form". Below you can see the HTML and client-side part. 
However, when I try to save, I see the following message:

SmithJohnson_0-1691134223341.png


HTML part:

<button ng-if="getPrimaryAction()" type="submit" ng-click="c.delete()" ng-disabled="submitting" class="btn btn-primary action-btn pull-right">${Delete}</button>

 

Client-side:

var c=this;
c.delete = function() {
	c.data.action = 'delete';
	c.server.update();
	var hosturl = 'https://' + $window.location.host;
	$window.location.href = hosturl + "/sp?id=sc_home"; 
};


Any ideas why I can't save it?

Smith.

 

10 REPLIES 10

Hello,

this is the code that I also had on the initial description of the post.

It does not allow me to save with this code.