I have a workflow creating a task when a user selects Yes or updates this field from No to Yes. Also, if the field is Yes, and they change it to No, a task will generate. However, now they don't want a task to be triggered when the field moves from blank to No. Can this be done, if so how?
Thank you.
*This post is locked for comments
Hi ,
Sorry I am bit confused your last post "I would need it when it is created and not saved yet as well as after it being saved." , do you mean that you need to create the tasks when the record not being saved as well? In that case you need to write JS code to trigger wrokflow on-change event.
In addition what I understand from your older post can proceed with below steps with real time workflow -
Step 1 :
If you need to create tasks when the record is created with field Value "Yes" till now its clear in that case you can go for workflow starts when record is created. As at the time of record created there is no old field value which means its null to "Yes",. In the workflow check condition if Field Value =="Yes" trigger task workflow.
Step 2:
You need to create tasks when record is being updated which means you need start workflow when record field change . In that case see below article which Ravi has shared already -
So there should two conditions when Field A does not contains data and then under that another if condition when field value is "Yes" , trigger task workflow or create tasks.
Hope this helps.
Would that work when the record is being created or would that only work once the record is saved once already? Because I would need it when it is created and not saved yet as well as after it being saved.
As mentioned earlier this cannot be achieved using a workflow.
no matter even if you trigger a plugin "before" field changes. That would of no use since you cannot actually check the before value in workflow.
Using Images in plugin is an advanced topic , you cannot jump onto this if you are new to plugins. Kindly start with some basic plugin tutorials and go on from there.
i have a silly suggestion - Since you have mentioned user manually selects this yes or no - create a business rule check if this field is null which will trigger on load - you create another field and may be set the value which you can then utilise in your workflow.
so in short if field was null - you are setting a new field value to "yes".
1. in your workflow now if you check if( this new field is yes & the original is also yes or no) --- this signifies that the value was changed from null to no or yes
Hi..
Sorry i miss understood your question..
This is not possible in just workflow.. you have to write Plugin for this.
You have to write plugin on post-update event for this entity and pass Pre-Image with attribute field A,B.
In plugin code, you need to compare pre-image value with value updated, when value in Pre-image for field A is blank and update value = No, then you dont have to create task, in other cases you can create task.
Here are some more details pre-images
community.dynamics.com/.../pre-image-and-post-image-in-dynamics-crm
community.dynamics.com/.../utilising-pre-post-entity-images-in-a-dynamics-crm-plugin
community.dynamics.com/.../pre-image-38-post-image-explained-33
crmbook.powerobjects.com/.../plug-in-images-pre-vs-post
Hope this will help..
My Field A and Field B contain Yes, No, and TBD. By default the field is blank. So can I do to ensure that when the field goes from blank to No, that a task will not trigger?
hi..
1. Make sure your workflow is triggering on "Record Status changes" and "Record field change"
Then add conditions and create tasks as follows
Now when ever option set value is changed from Black to Yes or No or Yes to No or No to Yes or record status is changed to Deactivate, workflow will be triggered and task will be created.
Here is more detail that may help someone to help me.
I need to create a workflow with the following criteria:
Task workflow will trigger from No to Yes for Field A or Field B
A Task will trigger upon deactivation of the record
Upon a change from Yes to No in Field A or B
A task should be triggered when either Field A or B moves from blank to Yes
A task should NOT be triggered when either Field A or B moves from blank to No.
I have a background workflow that is working for it all except the last line. I tried the real-time workflow, but do I need to turn all of these steps into a real-time workflow? Thank you for your help.
It seems to be running, but incorrectly yet. I am using child workflows as well now, as I should be right?
Hi ,
Make sure you save the record for real time workflow , you don't need to do anything .
If I do real-time workflow, does it still run by itself behind the scenes or does the user have to manually kick it off? I tried to test this and nothing ran behind the scenes automatically.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156