I want to add a custom button to the grid that when pressed will call my javascript function that relies on jspdf
I created 2 new web resources
I use Ribbon Workbench to add 2 actions for the command.
When I click on the custom button, I get javascript error "ReferenceError: jsPDF is not defined" on the line "let pdf = new jsPDF("p", "pt", "a4");" it seems that jsPDF is not being loaded at all?
Hi Kirk T,
Which is your version of Dynamics 365? Is it V9?
If yes, you could add your jspdf web resource to another JS web resource's dependence like this:
Below is my test:
My person.js:
function Person(name,age) {
this.name = name;
this.age = age;
}
Another JS web resource:
function preSetText(executionContext){
var someone = new Person("someone",20);
console.log(someone);
}
Add a button on my account form with another JS as command:
Result:
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156