locked
Advanced find RRS feed

  • Question

  • hi all,
    i need to query all contacts which have no workflows started,
    how to do that ?
    foreach(object HeartBeat in me.heart.Beats) messageBox.show("I miss u !!")
    Thursday, October 29, 2009 9:07 AM

Answers

  • Hi, Dany.

    To retrieve this data you have to use following steps:
    1. Retrieve list of all user that wave started workflow.
    2. Retrieve list of all users and remove from this list users which in 1.

    But best way for my opinion is to create report. This will solve all your problem easily and the SQL Query  for this is:

    Select c.* From FilteredContact c
    Where Not Exists(Select * From FilteredAsyncOperation Where regardingobjectid = c.contactid and operationtype = 10)



    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Thursday, October 29, 2009 11:32 AM
    Moderator

All replies

  • Hi, Dany.

    It seems that you can do it with Advanced Find. But you can develop some custom code to retrieve results.

    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Thursday, October 29, 2009 9:17 AM
    Moderator
  • hi Andriy,
    supposing that i develope some custom code,how can i use it to list result inner contacts list
    foreach(object HeartBeat in me.heart.Beats) messageBox.show("I love u !!")
    Thursday, October 29, 2009 9:38 AM
  • Dear Andriy,
    can you give me more details ?
    foreach(object HeartBeat in me.heart.Beats) messageBox.show("I love u !!")
    Thursday, October 29, 2009 11:05 AM
  • Hi, Dany.

    To retrieve this data you have to use following steps:
    1. Retrieve list of all user that wave started workflow.
    2. Retrieve list of all users and remove from this list users which in 1.

    But best way for my opinion is to create report. This will solve all your problem easily and the SQL Query  for this is:

    Select c.* From FilteredContact c
    Where Not Exists(Select * From FilteredAsyncOperation Where regardingobjectid = c.contactid and operationtype = 10)



    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Thursday, October 29, 2009 11:32 AM
    Moderator
  • I never tried but there are some FilteredViews for Workflow (FilteredWorkflow and FilteredWorkflowLog).

    As you can't request unexisting records with advanced find, you can surely do it using SQL and both specified filtered views

    Integrate this in a plugin or workflow activity or a custom web page to make the treatment you want with these contacts


    My blog : http://mscrmtools.blogspot.com You will find: Form Javascript Manager (export/import javascript from forms) ISV.Config Manager (graphical ISV.config edition - export/import) View Layout replicator (customize one view and replicate to others) And others (use tool tag on my blog)
    Thursday, October 29, 2009 11:46 AM
    Moderator