web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow question....

(0) ShareShare
ReportReport
Posted on by 26

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

I have the same question (0)
  • Verified answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: Workflow question....

    Hi There,

    Looks like that wont be possible through a workflow. as you need to know the origin of the value "NO" as in if its coming from a "null" value  or a "Yes" value.

    To achieve this , the only way possible is writing a plugin and using Pre & Post Images where you will be able to check what was the previous value and the next value.

    if you do this i would suggest to remove this whole workflow an do everything the plugin itself just for simplicity.

  • USA80 Profile Picture
    26 on at
    RE: Workflow question....

    I have never wrote a plugin before.  How do I do this and get it working?

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at
    RE: Workflow question....

    Hi..

    Instead of Boolean attribute for Yes/No, create pick list option, and then you can easily able to use workflow to trigger based on value changed from Yes to No or No to Yes.

    With Boolean attribute when new record is created what ever default value you set for attribute will be assigned to this field (either Yes or no), you will not get null for new records at all either in plugin or workflow..

    Hope this will help..

  • USA80 Profile Picture
    26 on at
    RE: Workflow question....

    I need the default to be null when new record is created, because otherwise the user filling out the form, could just bypass that field.  

  • USA80 Profile Picture
    26 on at
    RE: Workflow question....

    And I have it as a picklist already, with yes, no, and then blank by default

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: Workflow question....

    Hi,

    I think you should use plugin to achieve this task, look for preimage and postimage capabilities.

    Take a look below article on how to create such plugin.

    community.dynamics.com/.../pre-image-and-post-image-in-dynamics-crm

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Workflow question....

    Hi,

    You can try to trigger your workflow "before" the field changes. When you do this, you will get the old value and based on that you can write your logic.

    Check these:

    dyn365pros.com/.../using-microsoft-dynamics-crm-workflow-to-update-a-field-before-the-value-is-changed

    community.dynamics.com/.../146362

    Hope this helps.

  • USA80 Profile Picture
    26 on at
    RE: Workflow question....

    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.

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Workflow question....

    Hi ,

    Make sure you  save the record for real time workflow  , you don't need to do anything .

  • USA80 Profile Picture
    26 on at
    RE: Workflow question....

    It seems to be running, but incorrectly yet.  I am using child workflows as well now, as I should be right?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans