send email automatically in Microsoft dynamics CRM - dynamics-crm

I have field in entity Quote called new_date_expiration (type = Date).
I want send email if new_date_expiration equals date system in Microsoft dynamics CRM automatically.
any ideas?
thanks in advance.

You can do this using the CRM Workflow Automation Tool combined with an on-demand workflow. The setup process is quite simple:
Create a new workflow in CRM (make sure the "run on demand" option is turned on) which generates and sends your email.
Create an advanced find query on your entity which defines the criteria of when you want the email to be sent. In your case it sounds like the condition would be something like Expiration Date [equals] Today.
Once you are satisfied with the advanced find query, copy of the source FetchXML for it.
Configure the CRM Workflow Automation Tool (instructions on how to do this are included in the download package) to run the workflow created in the first step using the FetchXML you just copied.
Set your server to run the tool run daily at, for example, 8 AM using Windows Task Scheduler.
Once you have this configured, everyday at the specified time the results of the FetchXML query will be pulled and the provided workflow will be run against it. This effectively accomplishes exactly what you want without a bunch of timeouts.

Related

CRM Dynamics workflow not triggering for all records

Problem: Set up a workflow in CRM Dynamics 365 Sales that starts when the value of a specific field changes. But it turned out that the process does not start if changes are made to old CRM records (which were created before starting the process itself).
Question: Is there any method how can I make CRM start the process even for old records? I am sorry that everything is in Russian. I work in this version.
The process works correctly when creating a record and when editing a field in a new record. And when editing a field in an existing record, the process does not start
To make that Workflow to trigger on all records, make the scope as “Organization” instead of “User” - it should work as intended. Read more
It’s not about when it is created, probably those records are owned by somebody else. That’s why user scoped WF is not triggering at all.
Normally workflows trigger any future relevant changes. Otherwise, we should create a scenario where we cause that trigger. A couple of options,
As you have already set the workflow to run on a specific field change, you can make an update to that field and save the record which should trigger the workflow. If it's a very less number of records it's possible otherwise it's not a good idea to manually update all these records. If you don't want to do this manually you can update the records using any other option like a console app which makes updates to all the records (this would be faster assuming this is a one-time activity you have to do.)
Make this workflow on demand and trigger the same manually for all the records you want to run the workflow. Again this is a manual process but cleaner than the first one.
You do not need to do any manual update. The workflow you creates should be enough to kick in.
make sure your workflow has trigger on change of field. Screenshot for reference. It does not matter when the Workflow is created. As long as it satisfies condition it will kick in.

Can I create a report that will list all previously run reports?

I'm using Dynamics CRM 2015 and want to create a report that will show all reports run in the last 12 months.
I've been using the Report Wizard and can't seem to find the entity that is created when a report is run. I can find when a report was created but not every time it has been run.
Example of expected results:
Report X
4/3/2019 Admin 1
4/2/2019 Admin 3
Report Y
4/3/2019 Admin 2
4/2/2019 Admin 1
I'm not worried about the formats, I will most likely tinker with it after. I simply want to find a way to display every instance any report has been run.
Since you're on CRM 2015, it would follow that your system is on-prem.
That means you're not able to use the relatively new Activity Logging a.k.a. Read Auditing that's available in D365 Online, which seems to have what you're looking for.
The out-of-box audit in CRM 2015 would give you some kind of "user access" auditing (i.e. when people login), but not show you specific report runs. It's really designed to capture changes to the data for audited entities.
As far as I know there is no entity record created when a user runs a report. Provided you were willing to hook into and/or replace all the report triggers throughout the system (i.e. in all ribbons), you could hypothetically build something to track report runs. But it seems like that would be cost prohibitive.
According to this article you should be able to pull this info out of the ReportServer DB. I'd quote the relevant parts here but it seems very involved - creating temp tables, etc.

BulkDeleteFailureBase - lots of "Not Enough Privilege" records

I've taken over support of a CRM 2016 On-Premise system. I don't know the history of the particular instance, but I suspect it's been copied and/or imported many times.
The BulkDeleteFailureBase tables has just short of 2 million rows, almost all of which contain an error description like:
Not enough privilege to access the Microsoft Dynamics CRM object or
perform the requested operation. The current Organizationid '<GUID1>'
does not match with userOrTeam's organization id '<GUID2>'.
OrganisationBase has only one record with <GUID2> in it.
Has this happened because the instance has been copied/moved around incorrectly? If so, is this likely an indication more problems are heading my way in the future?
How can I recover from this?
BulkDeleteFailureBase is one of the system async jobs logging table where platform captures the run/success/failure logs.
Probably someone might have tried to clean the data like Plugin Trace log which were copied over from different DB backup/restore or CRM Org restoration. They used Bulk delete & all that fails, ended up here.
MS Support recommendation gives the script to clean those tables safely. Leaving it only gives you performance head-ache.

Realtime Workflow in Dynamics 365 Not Triggering when Record is Deleted

I'm creating a Realtime Workflow in Dynamics 365 that is set to trigger on both "Before Record Status Changes" as well as "Before Record Is Deleted". I can confirm that it is firing and working well for the Record Status Change case, but for some reason it's not firing when I delete the same record in question.
Would anyone have any ideas why this could be happening? I've even looked at the Process Session history and can see that only Record Status Change instances have fired. None of the Delete instances have a log entry.
I should also add that the workflow is extremely simple and doesn't do anything different for a delete vs a status change, so any record that works properly for the Status Change should have the same result for the Delete.
Any help would be greatly appreciated.
This could be due to missing some required security privileges for the user running the real-time workflow. The privileges listed here are listed in the Microsoft CRM/Dynamics 365 documentation at Required security privileges for real-time workflows
"A security privilege named Activate Real-time Processes
(prvActivateSynchronousWorkflow) is required to activate real-time
workflows so that they can be executed. The Execute Workflow Job
(prvWorkflowExecution) privilege is required to start the workflow.
Note that when opening a security role (Settings - Security - Security Roles, these privileges will be listed as "Activate Real-time processes" and "Execute Workflow job" when looking on the Customization tab of the security role. "
You can check scope of workflow. There is no platform bug I just created a RealTime WF on account delete and status change and that to Before... it worked fine.
Does any of the step skiping some logic.
Try creating Expense on Delete, if record gets deleted Expense entry will be created -just an example what I tried.
Keep WF Log Retension checked in order to track errors.

View list of agents and recipients OBIEE

I am trying to get a list of all of the agents setup in our OBIEE isntance.
I've found the agents in the table s_nq_job
However, I need the report that the agent is using, and a list of the recipients of that agent. Is that possible?
Analysis used in Agent is stored in S_NQ_JOB_PARAM.
Recipients in the Agent XML unless retrieved by a conditional analysis in which case you only get the list of recipients once the analysis is being run.
The xml of the agent is in a file in the web catalog file system. And you only see the actual XML, if it's changed or deleted you won't have past code.

Resources