Our pure JavaScript Scheduler component


Post by mba75 »

I try to use the scheduler in a Salesforce Lightning web component.

I have loaded my static resource and I wrote the following code to load the javascript.

when I load my component in salesforce I get the following error Uncaught (in promise) TypeError: Cannot read property 'body' of undefined
at eval (lwcStaticResource.js:4)
import { LightningElement } from 'lwc';
import { loadScript, loadStyle } from 'lightning/platformResourceLoader';
import Scheduler from '@salesforce/resourceUrl/Scheduler';

export default class LwcStaticResource extends LightningElement { 

    renderedCallback() {

        Promise.all([
            loadScript(this, Scheduler + '/scheduler.umd.js'),
            loadStyle(this, Scheduler + '/scheduler.default.css'),
        ])
            .then(() => {
                alert('Files loaded.');
            })
            .catch(error => {
                alert(error.body.message);
            });
    }
   
}
is it possible to use Bryntum Scheduler with Lightning web component ?

Post by Maxim Gorkovsky »

Hello.
As I understand this is new approach to lightning web components released with Summer 2019? We haven't tested that one yet, I'm afraid.
I opened ticket to investigate this problem: https://app.assembla.com/spaces/bryntum/tickets/9039-scheduler-throws-when-used-in-salesforce-summer-2019/details
Which scheduler version do you use?

Post by mba75 »

I am using the version 2.2.1 and I've originally tried with 1.2

Post by Maxim Gorkovsky »

Hello. With latest 4.0 release we announced experimental Lightning Locker support and added a demo showing how to use Bryntum products as Lightning Web Components. Please refer to examples/salesforce/README.md for more details.
Looking forward to your feedback.


Post Reply