cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sdnd2000
Helper I
Helper I

failed to execute on node

Hi, I am creating my first control, but it gave me the below error, I attached the code in the init event, please advise.

 

public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement)
	{
		this.localNotifyOutputChanged = notifyOutputChanged;

		//Configure buttons
		this.nextButtonElement = document.createElement("a");
		this.nextButtonElement.setAttribute("class","next");
		this.nextButtonElement.addEventListener("click",this.nextOnClick.bind(this));

	 	this.nextButtonElement = document.createElement("a");
		this.nextButtonElement.setAttribute("class","previous");
		this.nextButtonElement.addEventListener("click",this.previousOnClick.bind(this));

		this.spaceElement = document.createElement("span"); 

		var _previous = container.appendChild(this.previousButtonElement);
		var _space = container.appendChild(this.spaceElement);
		var _next = container.appendChild(this.nextButtonElement);
		_previous.innerHTML = "&laquo; Previous";
		_space.innerHTML = "&nbsp;";
		_next.innerHTML = "Next &raquo";
}

 

 

 

WeChat Screenshot_20210418104555.png

1 ACCEPTED SOLUTION

Accepted Solutions
DianaBirkelbach
Super User
Super User

HI @sdnd2000 , 

You've created two times the this.nextButtonElement, but forgot to create this.previousButtonElement.
It must be a copy/paste error.

Kind regrads,

Diana

View solution in original post

1 REPLY 1
DianaBirkelbach
Super User
Super User

HI @sdnd2000 , 

You've created two times the this.nextButtonElement, but forgot to create this.previousButtonElement.
It must be a copy/paste error.

Kind regrads,

Diana

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (89,166)