Trying to create a Toast
I'm very new to add-ins, and have been going through the tutorials to get a sense for how they work. I've done the Hello World Button tutorial, which was working, but I want to modify it to show a toast message rather than a modal. That's not working, and I'm not sure why. This is the function that I've modified to show a toast instead of a modal:
function showAddCustomerModal() {
client.showToast({
message: 'This is a toast message.',
style: AddinToastStyle.Info
});
Anything obvious that I've done wrong?
function showAddCustomerModal() {
client.showToast({
message: 'This is a toast message.',
style: AddinToastStyle.Info
});
Anything obvious that I've done wrong?
0
Comments
-
HI Ben,
Your code looks right at a glance (aside from missing the closing bracket for the function itself) - let's get a few more details from you to troubleshoot:- Which extension point are you using (constituent tile dashboard, page action, etc.)?
- Do you see any errors in the browser console?
0 -
I'm trying it both on the Constituent Page Action (Preview) and on Development Office Home Action (Preview). I'm also running this in the test RE environment.
The browser console shows a number of errors, mostly in the form of this:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api-js.mixpanel.com/groups/?ip=1&_=1588694194501. (Reason: CORS request did not succeed).
There's also a TypeError: "e is undefined"
0 -
Thanks Ben - we're investigating and will report back asap.0
-
Hi Ben R.,
I don't believe the mixpanel errors should prevent the toast from displaying. Could you try changing your code to be the following:
function showAddCustomerModal() {
client.showToast({
message: 'This is a toast message.',
style: BBSkyAddinClient.AddinToastStyle.Info
});
Fully-qualifying the AddinToastStyle enum value.
Also, to double check, are you pulling in the sky-addin-client (in helloworldbutton.html) like this?
<script src="https://sky.blackbaudcdn.net/static/sky-addin-client/1/sky-addin-client.umd.min.js"></script>
Thanks.
1 -
Using BBSkyAddinClient.AddinToastStyle.Info fixed it on the Constituent Page Action (Preview), but not on Development Office Home Action (Preview).
(For this project, I only need it to work on the Constituent page, so for my purposes this is good enough! But if you'd like me to try anything else to troubleshoot the Home page, I'd be happy to try things out.)
Thanks for your help.0
Categories
- All Categories
- 6 Blackbaud Community Help
- 206 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 357 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 561 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.6K SKY Developer
- 242 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 778 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)


