system.kanoa.dashboard.updateUserDashboard
Description
Updates a users dashboard entrySyntax
updateUserDashboard(userDashboardInfo, userId)- dashboardInfo (dict)
- - userDashboardId (int)
- - dashboardId (int)
- - userId (int): The user this dashboard is being added to
- - isDefault (bool)
- - isFavorite (bool)
- userId (int): used for the createdBy field
- retVal (int): # of records modified
- msg (string): error message, None if successful
Code Examples
# Example usage
userDashboardInfo = {
"userDashboardId": 12,
"dashboardId": 4,
"userId": 7,
"isDefault": True,
"isFavorite": False
}
userId = 123
retVal, msg = system.kanoa.dashboard.updateUserDashboard(userDashboardInfo, userId)
if msg: system.perspective.sendMessage('showFailerToast', msg)
else: system.perspective.sendMessage('showSuccessfulToast', 'User Dashboard has been updated')