How to handle database modifications via Power Apps? - microsoft-teams

First of all, I would like to say please do not be surprised by my question cause I'm a beginner in this sphere.
I just started work with Power Apps and I have the following task:
I need to create some "Notification Service" which will be sent the notification inside Teams group after the event in the SQL table (for example, after successful insert into table).
Could you please explain, is it possible to do via Power Apps features without writing a code?
The application must be work in background mode and automatically send information about new rows in DB.
Any your answer will be very helpful for me!
Thanks for your answers!

PowerApps doesn't have the ability to notify people this way. You have to use Power Automate. A flow can be triggered when a row is changed or modified. In order to trigger a Flow on a database, the database field must have a TimeStamp field and a primary key.

Related

Am I "Allowed" to add a default constraint directly to DB in Dynamics 365?

Wondering if anyone can help a total newbie to Dynamics 365. Have started working on an existing implementation of Dynamics 365 (on premise) and am told by current developers that under no circumstances can I amend a column in a table for one of our entities directly on the DB. I am simply wanting to default an INT column to value 1.
They tell me "Dynamics is a black box and you will be breaking the law if you amend directly". This can't be true can it?
Thanks for any advice you can offer.
Building on what Josh said, it is true that the Dynamics SQL database is a black box. Everything must be done through the API with the exception of creating custom indexes on tables and reading from the "Filtered" views.
(And with the new T-SQL endpoint in preview for the online product, you're able to run SQL select queries against an online org.)
The reason for this that all events in Dynamics go through the "platform" via messages. For example, you might have plugin or workflow automation that triggers on the Update of an Account. When the platform receives the "Update" message for an Account, it searches for subscribers to that event and runs any subscribed processes. If you write a change directly to an Account record in SQL, you deprive the platform of the opportunity to run its processes for that event.
And it is good to note that Microsoft uses the same event framework for internal events. So, if you say, "Well, I have no custom plugins or workflows running on the Update message for Accounts so I can edit Accounts directly in SQL." By doing so you'd still risk breaking an internal Microsoft process that triggers on that event.
In a nutshell the platform's need to process ALL events is why direct updates to the database are unsupported. If you do them, Microsoft will refuse to support your system.
Another consideration is that if you ever want to move to the Dynamics Online, writing to the database isn't even possible, so you'd have to redo any automation that relied on that. This is another reason why everyone generally accepts the need to customize their system in the supported way.
Do people occasionally do unsupported things, with good justification? Yes, perhaps most commonly in making unsupported changes to the UI. Even so, writing directly to the database is among the highest offenses to be avoided.
Back to your scenario... it can be jarring to discover that the SQL database is off limits for any direct writing or schema changes. Fortunately Dynamics provides many other automation "hooks" including client-side JavaScript, Business Rules, Power Automate Flows, workflows, and plugins (synchronous and asynchronous).
To set a default value in the UI, the options include a Business Rule and JavaScript. To set a default value in the database, a synchronous workflow or plugin would do the trick.
The Developer Guide is a good place to start.
This would be considered an “unsupported” customization by Microsoft. If it breaks something in the logic of the app, Microsoft won’t help you fix it. If you ever move to Online instead of On-premise, you won’t have this ability. The current developers are battle-hardened and are trying to help you. This is a very bad idea - better would be to create a plug-in on Create of that entity that sets up default values for null fields. This way your logic is in the app with all the other custom logic and is supported.

Utilizing Workflow to Automatically Resolve a Case in Microsoft CRM (No User Input)

I have a logic question regarding the capabilities of automatically resolving Microsoft Dynamics 365 CRM (or similar platforms) cases. I utilize an Access database to create emails to send to customers with specific data, while copying my team email to keep track of communications in Microsoft CRM. This action creates a new case in my CRM, which I then need to "Work On" case, add my specific operational catalogs and affected contacts, then finish case as Resolved just to ensure tracking in the CRM system.
My team is currently testing out the capabilities of XML coding in the email which allows the CRM to automatically capture the case specifics described above, however they still need to go in and resolve each case at the end of the day.
After some research, I see that a workflow may be able to do this job of automatically Resolving cases. Is this a possible function for a workflow or plugin to do? Alternatively I have been told by my IT department that we need to have a robot built to complete this task, but I would like to keep this as efficient (and cost savvy) as possible. Any input or suggestions are greatly valued and appreciated.
Thank you!
There are two ways you can solve your problem.
If you want to close all the "CASES" by the day end you can schedule
a "System Workflow" that will execute daily at a specific time and
"Close/Resolve" all the open CASES in your system. Please find below
link on how to setup a "Schedule Workflow" in Dynamics CRM Create
Recursive or Scheduled Workflows in CRM
You can resolve specific cases on Dynamics CRM using C#. Please find below link on how to resolve case using C#.How to close cases in crm 2011 programmatically
Yes. Workflows can be used to close Case records in CRM
If you have the resources (staff) available to write CRM code, you can do it via Code (C#) as well

How to use Dexie to synchronize a MSSQL database using an Order Form

I am looking to create an HTML5 Online Order app using Dexie. The back-end database is MSSQL. I would like to connect to the SQL DB, load data from one or more tables into an IndexDB and provide a order form for the user to select items to order and then be able submit the order form.
Is this possible with Dexie and how would I implement two-way synchronization to keep inventory totals up-to-date?
If someone can point out the pieces I will need I can research this on my own. I would not mind some examples as well.
I appreciate any help that is offered.
Regards,
Joe

SSRS Subscription Permissions

I can't find much about this online so I was wondering if someone knew here.
Is SSRS 2005 if a user creates a subscription, will other users be able to view and edit those subsciptions? If not, is it possible to make subsciriptions visible to everyone?
Thanks
Quick answer is no.
Long answer is:
AFAIK, there is no site-wide subscription management functionality. The best you can do within Report Manager is site-wide schedule management, which allows admins to set up schedules at preferred times and let users choose those schedules when creating their subscriptions.
Our solution for controlling/centralising subscriptions was to set up a generic Windows user, log in to Report Manager and use that user to create all subscriptions. This means that all requests for subscriptions go through the IT department (+ or - depends on your situation. We didn't want users creating subscriptions themselves). All users who know the generic username/password can manage subscriptions in one place. Not ideal but it works for us.
Another option is that all the data for subscriptions is held on the Server, either in the Reporting Services database or in the Jobs themselves. If you are brave you can delve in and set up some sort of interface to access this.
This is definitely an area in which I find SSRS lacking.
Update:
You live and learn. I've just found that (provided you have sufficient privileges) if you open a report, then go to the subscriptions tab, you can view and edit any subscriptions that are set up on this report by any user. Still not ideal as you don't get an overview of the subscriptions across the system but better than the bleak picture I painted previously!

WorkItemChanged event Client Side

For my current project I have to add a record to a database when a custom workitem changes to specific states. For this you can build a TFS plugin which fires at the WorkItemChanged Event. However our company policies don't allow us to build these plugins because it is processed for each workitem in all projectcollections. This action is only needed for a few team projects.
My question: is it possible to create some clientside plugin(perhaps a VS plugin) which fires an action on this event instead? Or is there someway to create another sort of listener to this event?
Any suggestions would be greatly appreciated, thanks in advance.
Instead of having TFS drive the alerts for you, you can implement a polling based alert system.
I would create a simple work item query that selected the work items you were interested in and sorted by the Changed Date column. Then I would write a simple program that used the TFS SDK to run this work item query and notify based on the results, keeping a high water mark between polls. (The TFS SDK samples has an example of running a work item query.)
Note that this polling-based approach has advantages over setting up a SOAP listener regardless of your corporate policy. The SOAP-based alerts system that TFS uses was developed for communication between components of the TFS infrastructure. It's expected that the SOAP endpoint you configure is high availability - if your machine goes down, the SOAP service crashes or your IP address changes, you'll start seeing TFS complaining in the event log. I filled up the event log on my TFS server before I switched to a polling based model for a similar alert system.
In the end I created a custom control for in the WorkItem editform. Within this control I could implement all the required logic for creating the database record.
So instead of setting the combobox state to the onhold state, there now is a button which does exactly the same, executes my custom coding and thus adds a record to our database.

Resources