CRM workflow run another workflow - workflow

Not a duplicate of this
I have a pretty simple CRM workflow, which basicly just adds some values to some fields that doesn't get filled whenever a user creates a new object. My challenge here is that a lot of objects are already created in CRM, with a lot of null values. We are talking thousands. So instead of asking the client to open every single object and running the workflow, I was thinking I could create a second workflow which initiates the first workflow to run on all current objects. Is this possible and how should I do it?

The problem is not the workflow execution. Its the selection of the record. Dynamics CRM doesn't have the possibility to execute a workflow against a massive amount of records.
You have to script a little program which selects the records for which you would like to run the workflow and start the workflow for each of them.
See How to run ondemand workflow over all pages

Related

Access lastScheduledTime from cron workflow

I'm trying to implement automatic backfills in Argo workflows, and one of the last pieces of the puzzle I'm missing is how to access the lastScheduledTime field from my workflow template.
I see that it's part of the template, and I see it getting updated each time a workflow is scheduled, but I can't find a way to access it from my template to calculate how many executions I might have missed since the last time the scheduler was online.
Is this possible? Or maybe, is this the best way to implement this functionality on Argo?

Suitescript - nlapiSendEmail() - Can I delay an email through script to send on certain date?

I currently have a script that triggers on save that sends out an email. However, under certain criteria, I would like to still trigger the script on save but delay the email until a certain date. Is this possible? How would that be written?
You might want to you NetSuite Workflow. You can put the record in a workflow state based on you condition. On that workflow state have a delay transition to another state after x days which will send the email.
Look at the SuiteAnswer for drop marketing for sample workflows.
#scheppsr77's answer is a good idea.
Another way to do it would be to create a new custom record type that holds the email information and the date you want to send it on. Then have a script that runs periodically checking for any emails to send. Basically it could run like a cron job. I've done that before, for certain items that needed to be re-run or needed to delay.

Dynamics Crm workflow avoid update of record

In a CRM 2016 online real-time workflow, is it possible to avoid a record to be updated? In particular i created a real-time workflow of the type "before record status updated", and my objective is that I don't want an opportunity to be activated, if the value of a field of the opportunity is "yes".
Is this behaviour achievable with a workflow, or I need a plugin?
Just for chucks and giggles: As you said it is a real time workflow, you could use a custom workflow activity to throw an error, that would prevent record creation or update as real time workflows are transactional with the create/update operation.
Recommended: Synchronous plugins were put in place exactly for this very reason, to perform business validations and complex business operations.
To use the system as intended, use a plugin.

CRM 2011 custom Plugin passing parameters to processes

We are trying to automate a few things in CRM and I have an idea about how to go about it while still allowing customizations from the Process section in CRM Settings.
The problem: We receive a lot of E-mails from an account that are added to a Queue. This queue fills up faster than we can clear it. Most of these E-mails have a standard format and the user only has to read a few lines of the the E-mail body to figure out what to do. There's a total of 6 different workflows that the user would do. These haven't been implemented.
Reading the documentation of CRM, I figured that I would need a custom Plug-in that would parse the E-mail body, and trigger a workflow in CRM according to the values in the E-mail. I also need some of the values that the E-mail contains to be passed to the workflow. I already have the Plug-in setup to do this.
The problem I run into is creating a process which takes in custom parameters passed over by the Plug-in I created. I need to access these values in the front-end (one of the Processes in CRM Settings). Is this possible? If not, is there another way to achieve this?
Is there a reason you used a Plugin to kick-off this automation instead of a Custom Workflow (which is a Process)? You could perform the parsing of the E-mail inside your Custom Workflow, and use its InOutArgument properties to pass values into subsequent child workflows.
Definition: https://msdn.microsoft.com/en-us/library/gg327984(v=crm.5).aspx
Sample: https://msdn.microsoft.com/en-au/library/gg334455(v=crm.5).aspx

MS CRM recursive workflow and performance

I’m about to write a workflow in CRM that calls itself every day. This is a recursive workflow.
It will run on half a million entities each day and deactive the record if it was not been upodated in the past 3 days.
I’m worried about performance has anyone else done this.
I haven't personally implemented anything like this, but that's 500,000 records that are floating around in the DB that the async service has to keep track of, which is going to tax your hardware. In addition, CRM keeps track of recursive workflow instances. I don't have the exact specs in front of me, but if a workflow calls itself a set number of times within a certain timeframe, CRM will kill the workflow.
Could you just write a console app that asks the Crm Service for records that haven't been updated in three days, and then deactivate them? Run it as a scheduled task once a day, and then your CRM system doesn't have the burden of keeping track of all those running workflow instances.
EDIT: Ah, I see now you might have been thinking of one workflow that runs on all the records as opposed to workflows running on each record. benjynito's advice makes sense if you go this route, although I still think a scheduled task would be more appropriate than using workflow.
You'll want to make sure your workflow is running in non-peak hours. Assuming you have an on-premise installation you should be able to get away with that. If you're using a hosted instance, you might be worried about one organization running the workflow while another organization is using the system. Use the timeout and maybe a custom workflow activity, if necessary, to force the start time to a certain period.
I'm assuming you'll be as efficient as possible in figuring out which records to deactivate. (i.e. Query Expression would only bring back the records you'll be deactivating).
The built-in infinite loop-protection offered by CRM shouldn't kill your workflow instances. It stops after a call depth of 8, but it resets to 1 if no calls are made for an hour. So the fact that you're doing this once a day should make you OK on the recursive workflow front.