Count Activities from an opportunity - dynamics-crm

I have a workflow on an opportunity. I am trying to count the number activities from the opportunity workflow.
And use this count on condition within the workflow.

I agree with Matt's answer. You need to hook a custom workflow activity in order to get the Opportunity object that you are currently interesting on, and finally inside the custom workflow activity, you can use CRM SDK to find the related activites regarding the opportunity.
Here is the link to setup a basic custom workflow activity : http://www.stunnware.com/crm2/topic.aspx?id=CustomWorkflowActivity

I don't believe there's a way to accomplish this natively in the workflow engine. You'll have to create a custom workflow activity that gets this count for you and then returns it to the workflow, and then you can use it within your condition.
An example of some custom activities on CodePlex:
http://crm4activities.codeplex.com/
Custom workflow activity documentation on MSDN:
http://msdn.microsoft.com/en-us/library/cc151142.aspx

Related

How can I open slack modal during slack workflow execution step?

I am currently working on slack app with custom workflow step which is used to get some data from user during execution using modals,
I can do that using built-in forms from workflow builder like in the attached image.
Built in workflow form
However my form is more interactive and requires input fields to be changed based on user selection, to do that I am trying to consume https://slack.dev/java-slack-sdk/guides/modals API with custom workflow step.
My question is, do I have any chance to call open modal API, during custom workflow execution step: https://api.slack.com/events/workflow_step_execute ?
So far I failed to identify what can I use as triggerId during workflow step execution.
Thank you in advance and I do understand my question is complex, so will be happy to provide more information.
Unfortunately, it's not possible to trigger a modal from within a Workflow. Workflow Builder currently doesn't support conditional interactivity either. Sorry I don't have better news. On the plus side, Workflow Builder is going to see some significant upgrades this year!

Alfresco activiti review task: required form field on reject

I have an Alfresco (5.2.4) platform with a custom document approval workflow.
When a user rejects a document he/she has to write a comment to justify the rejection, but that comment is mandatory only in that case.
How can I achieve that?
I'm searching for some activiti-like solution, using boundary events or Intermediate Throwing/Catching Events.
On the other hand, can I use a simple javascript dialogue to stop the workflow execution and make the user fill the comment box?
Does anyone know the best approach?
Thanks

Magento update order state via SOAP

I need to update order state remotely. Is it possible to update it via SOAP?
I know about "sales_order.addComment", but it updates only status not state.
My version is CE 1.7.0.2
Thank you.
As i know we can not get state about order Also you can get only information about an order and add a comment to it.
You cannot edit or delete an order.
You have to create your own API if you need that. See this link to see what is possible with the API: Magento Core API - Mage Sales
hope you can understand this concern.
Currently magento do NOT have a soap api to update order state, but you could create you own custom api take a look # Creating a Custom API or Extending the Core API
A bit of a necro answer here, but one basic strategy might involve a basic cron task that runs every few minutes.
Since you can update the status via the API, you might create a couple new custom statuses that you update as needed. The first status would mark an order as being ready to be consumed by your logic, the second status marks an order as done being consumed.
Then your cron script could just check for orders that are done being consumed which you can then use standard Magento standard model operations to update the state.

How to change Activity Type list in quick campaign wizard?

Is there any way to change activity list in Quick Campaign wizard in CRM 2011? I want to add one more activity here.
Great question but unfortunately this is not possible with custom activities. You are constrained by the default options that you can see in your screenshot.
Possible workarounds:
Do what we used to in CRM 4.0 and repurpose one of the native activities (e.g. rename "Fax" entity) and use that
Add a hidden custom attribute to native activity and then use a plugin to "convert" each record with the attribute set into an instance of your own custom activity. This still won't surface your custom activity within your quick campaign but it will at least assist the "bulk creation" side of things.

How do I sanitize a workflow uploaded by a user?

I have a multi-tenant application that may run arbitrary workflows as needed.
I plan on using the workflow designer to create these workflows, but even if I limit the Activities in the Toolbox, that doesn't prevent a malicious user from editing his own XAML file, doing activities I'd rather them not (specifically calling out to the .NET framework)
For a given workflow, how do I verify that the only actions being used are those I approve of? Is an XPath query the only way, or is there a feature within WF that will validate this?
If you need a visual introduction to what I'm looking for here is a sample project and video referring to it.
I'd just load the workflows in a sandboxed AppDomain. You can Use the GetStandardSandbox static method of the SecurityManager to set this up relatively easily (and safely).
Of course, I haven't actually done this yet, but I'm definitely thinking about adding some of this to my current WF code (which does use AppDomains to isolate execution of workflows from my application).
All you can do is load the XAML as XML and check what is in there. And make sure to check any VB expression entered as users can put interesting things in there as well.

Resources