Multiple Entities In One MS CRM Workflow - dynamics-crm-2011

I am trying to create a workflow the gets an entities attribute value and minuses it from another entities attribute value and then have a conditional check on the result. The workflow needs to be run from an account and link to the other entity.

If the second entity is related to the account, you can do this with a normal workflow. In your Update step select the field that you are calculating, and in the "Form Assistant" window on the right side of the screen select Operator = "Decrement by" and then select the related entity and field that hold the value you wish to subtract.
If the second entity is not related to the account then you have no easy options.

Related

CRM Auto Populate Field From Option Set

I have an Incident entity in CRM 2016 that has an ownerID which relates to a User entity. On that User entity, I have a Location field, which is based on a global option set.
On my Incident form, how would I be able to automatically populate a location field, based on the owner that's selected?
If you just need to show the value you can create a Quick View Form and put it on the form.
If you need to copy the value, because it's a lookup, you can create a Workflow that will copy the value when the record is created or reassigned.
Or - Adding to Guido's Answer - if you want the user to be able to see the value on the form when it loads, you'll need to use the Rest API to query for the Location value of the owner. Use the FetchXmlBuilder for the XrmToolBox to generate the URL that you'll need.

How to select a field as input value in a CRM 2011 custom workflow activity

I need the end user to select which field he wants updated. Is there an option to have a lookup input parameter that let's the user select a field of the current entity?
I need it to perform operations on the value of the selected field.
As far as I know there isn't a custom type to handle a list of fields (or a list of strings) as InputParameter for a Custom Workflow Activity.
The (ugly) alternative is to use a string parameter where the user enters the field name.
If the list of fields isn't very big, you could add an optionset to the form with those field names and then your workflow could have If conditions based on that optionset.
I strongly suggest you to use a dialog to complete this. You can set the stage, the parameter and based on the situation the values to insert. Also you can execute workflows from the dialog itself.
If the record already exists, consider registering a plug-in on the update message. When in update the request InputParameter["Target"] contains only dirty fields changed by the user.
Instead of creating a list of fields you can create another (role) form to limit the fields the user can edit on the form.

Possibilities within CMR 2011

Consider the following requirements for CRM 2011:
2 custom entities are needed, let's say EntityA and EntityB.
EntityA contains the following fields:
ContactA (lookup on contact)
ContactB (lookup on contact)
Customer (lookup on account)
EntityB contains the following field:
Beneficiary (lookup on either contact or account)
A button must be added to the ribbon of the form of EntityA. When clicking this button a dialog must start where the user can make a selection wether to use field ContactA, ContactB or Customer. When the selection is made and the dialog is closed, a new EntityB must be created and sets the value of field Beneficiary to the value that is selected in the dialog.
Also the form of EntityB must get a new button in the ribbon. When this button is clicked a report on the report server is executed. The report must not be shown but instead a PDF must be generated that has to be attached to an email activity and the email must be send to the beneficiary.
I'm afraid that not all requirements are possible in CRM 2011:
Is is possible to create a lookup on 2 or more entities (like OwnerId that can look up SystemUser and Team values)?
Is it possible to start a dialog from a ribbon button?
Is it possible to use values from an existing entity in a dialog?
Is it possible to instantly generate a pdf from a report to add it as a mailattachment?
The CRM environment is partner hosted, but CRM is not sandboxed and local resources can be used.
An other option that comes to mind is instead of creating it all in CRM 2011, to create an external webapplication to overcome some of the bottlenecks. Would this be a possibility or is it just a bad idea?
Thanks for your advise!
Is is possible to create a lookup on 2 or more entities (like OwnerId that can look up SystemUser and Team values)? - Answer: No. Check this link. But you can solve this with two lookup fields and one option set which will be filter field.
Is it possible to start a dialog from a ribbon button? - Answer: Yes. You have a lot of articles on this topic.
Is it possible to use values from an existing entity in a dialog? - Answer: Yes. You can use values of selected entity, for which you are start dialog. Also check those links for creating dialogs.
Is it possible to instantly generate a pdf from a report to add it as a mailattachment? - Answer: I don't have experience with this, but some articles says that it is possible. Check this two posts.
I hope this will help :)

Dynamics CRM 2011: Extended lookup for a field in "Create New" form

I have the following scenario:
A user wants to create a new record of entity CustomEntity1. One of the fields on the "Create New" form is a reference to the entity of type CustomEntity2.
Now, there is a built in lookup where thety can search by name, or filter the options to a predefined view. This doesn't help, because the user needs to get the name (or names) of CustomEntity2 which satisfies a set of criteria based on the fields in CustomEntity2.
Is there a way to incorporate this in "Create New" form for CustomEntity1?
And the question again, a bit less abstract:
The user needs to create a new record of type CustomerAccount. In doing this he/she needs to fill a field called Group. This should be looked up in a list of existing groups, based on several criteria - Type, Region, Budget and so on. Is there a way for the user to enter this criteria while creating the new record, and not go separately to the list of Groups and run a report to find the candidates?
You can use the addCustomView method of the lookup control to filter the options based on the fetchXML and layoutXML that you provide.
One way to supply the right conditions to your custom fetchXML is to duplicate the Type, Region, and Budget fields in the CustomerAccount form, so that when the lookup dialog is opened, it filters the existing Groups based on the values you've selected in the CustomerAccount form.

In SharePoint, how can the "Issue ID" column of an issues list be included in the detail form (DispForm.aspx) and/or alert emails?

We've created a pretty standard issue tracking system based off of SharePoint's template with just a few extra columns. On the list view (AllItems.aspx), the first column is called "Issue ID" and has a number. Our developers and QC use that number in discussions. However, that number doesn't seem to want to show up on the detail form (DispForm.aspx) nor in the alert email.
Can this field be included in at least one of these communication methods? If so, how?
Thank you.
We did something similar and used workflow via SharePoint Designer to copy the ID field into a field called "Issue Number". The workflow gets triggered automatically on Create / Edit (we included edit because the field can be modified by the user on the edit form and if that happens we want the number refreshed with the actual ID).
Before you create the workflow in SharePoint Designer, you need to add a column called "Issue Number" to the list you want to tweak.
List item
Open Sharepoint Designer
List item
Click File New -> Workflow
Give a name for the workflow
a. select the list from the dropdown
b. Uncheck Allow this workflow to be manually started and check automatically start on new and change then press Next
Give the step a name like "Assign Issue Number"
Create a Condition
If Compare a field -> If Issue Number not equals Current_Item:ID
Create an Action
Update List Item -> Set Issue Number to Current_Item:ID
Press Finished and test out by creating a new issue.
*The Issue Number will appear on the form and if you have emails setup to notify on assignment it will appear in the reassigned template.
*It will not appear in the created email confirmation because the workflow gets triggered after that email was executed.
I just added the issue ID using a total of 4 characters. Create a new column, set it to a Calculated column, in the formula type [ID]. Voila! The ID is now in your detail view.
The ID link returned the for me, however, the work around which sufficed for me was to enter 'Created' in the Calculated Column formula and ensure it is set at date and time. That then creates a unique idenity (unless you receive more than 1 list update per minute) than can be viewed in the email alert message

Resources