Forum Discussion
Save button disabled when trying to add a custom app from a meeting extension
- Jul 23, 2024
Good to know my last response worked for you, ChaitanyaSai370.
add this code too in the useEffect.
pages.config.registerOnSaveHandler((saveEvent) => { const baseUrl = `https://${window.location.hostname}:${window.location.port}`; pages.config .setConfig({ entityId: "pageId", contentUrl: baseUrl + "/index.html#/tab", websiteUrl: baseUrl + "/index.html#/tab", suggestedDisplayName: "DisplayName", }) .then(() => { saveEvent.notifySuccess(); }); saveEvent.notifySuccess(); });
then too if same error shows up try changing "canUpdateConfiguration" value to false in the manifest file.Hope this works.
Please like my responses and mark them as solution to the question.
Hello ChaitanyaSai370 ,
Hope you must have created a route for the config tab in the manifest of the app.
check the code for that config page that it enables the save button by passing Boolean value 'true' after all settings configured.
import { pages } from "@microsoft/teams-js";
useEffect(() => {
app.initialize().then(() => {
/**
* After verifying that the settings for your tab are correctly
* filled in by the user you need to set the state of the dialog
* to be valid. This will enable the save button in the configuration
* dialog.
*/
pages.config.setValidityState(true);
// Hide the loading indicator.
app.notifySuccess();
});
}, []);
Thank you so much for your reply. The "Save" button is now clickable. But I get an error when I try clicking it.
I am trying to do this from the teams toolkit. Could you let me know where can we check the logs for this?
I am also sharing my manifest file and the configuration tab html file to see if that helps.
manifest:
HTML page config file:
- huzefamehidpurwalaJul 23, 2024Copper Contributor
Good to know my last response worked for you, ChaitanyaSai370.
add this code too in the useEffect.
pages.config.registerOnSaveHandler((saveEvent) => { const baseUrl = `https://${window.location.hostname}:${window.location.port}`; pages.config .setConfig({ entityId: "pageId", contentUrl: baseUrl + "/index.html#/tab", websiteUrl: baseUrl + "/index.html#/tab", suggestedDisplayName: "DisplayName", }) .then(() => { saveEvent.notifySuccess(); }); saveEvent.notifySuccess(); });
then too if same error shows up try changing "canUpdateConfiguration" value to false in the manifest file.Hope this works.
Please like my responses and mark them as solution to the question.- ChaitanyaSai370Jul 23, 2024Copper ContributorHey huzefamehidpurwala, Thank you so much! this worked. I had another question-
I want this custom app to show up on the meeting ribbon automatically for certain users when the meeting starts. Is there a place to add the user accounts to whom this app should be visible?- huzefamehidpurwalaJul 23, 2024Copper ContributorAs what I know there's nothing such configurations available. The meeting-app once added in the meeting by the organizer, the app is then available to all the attendees in the meeting through the ribbon or the app listed under the "Apps" button.
It depends on the width of the window that the app icon comes up on the ribbon or goes under the "Apps" button.