Dynamics CRM - Business Rules don't Lock Header Fields
Is there anyway to use a Business Rule and have it "work" against fields in the Header? Or documentation that acknowledges/explains this behavior?
Situation:
Field "Owner" in Header of Account Form
Business Rule Locks that field if "Customer" = Yes (Customer is in the Body, not Header)
I set "Customer" = Yes
Field "Owner" in Header of Account Form - is NOT Locked
If I put a copy of "Owner" in the Body, THAT instance of the field IS Locked
What's going on?
Related
Can I:
make manipulation with subgrid so I can choose multiple Contacts and save them in the field (or even better choose only the email address from the Contacts) or
make a lookup field to Contact that allows me to choose multiple contacts
Longer description of the problem:
I have made some customization of the Invoice entity in Dynamics Sales, but what I also need is an email failed that is a lookup to Contacts, so I can choose a multiple contacts, so later on I can get the email information and send them an email with power automate. But since I'm new to Dynamics I'm not sure how to manipulate with the subgrid, I researched something about creating N:N relationship, but I'm not sure how can I manipulate with on save/ on load events, cause I need to choose multiple contacts and save them in this field.
Customized Invoice Entity
For the accounts entity I have different account types.
However I need to make some of these records read only only based on the account type, as these records will be slaved in CRM.
However the user should still have ability to create other types of accounts that will be mastered in CRM.
I was thinking to do this via security role however when giving create or edit permission on the account entity user can still create accounts of any type or edit existing slaved data.
What would be the best way to make slaved data read only?
Use business rules to lock all fields based on the type?
Like you said, this cannot be achieved with security role, since the requirement is based on a field value.
Disabling all the form fields in bulk - You can do this in javascript quickly, or may be with Business rules one by one. Verify the field value on form load for your certain slaved value account type, then disable the controls by iterating each one of them.
Still subgrid, webresource, iframes will be editable.
I have a business requirement that execs are really wanting to see. In our lead and email templates we have a few of our products listed. The products themselves are pretty stable but the prices are of course subject to change.
I'm OK with hard coding the product name into email but I was hoping the price could be a slug that get's resolved.
We only have one price list so nothing to worry about there.
I see no way to get access to the product and or price list entities through the data field values dialog.
So my thought was to create the 2-4 fields in the lead and opportunity entities. Then create a background workflow that takes the price from the price list and sets those fields.
Then when an email is generated I can access those hidden fields as they will be available through the lead or opportunity entity.
Any thoughts, concerns, better approaches?
Unfortunately CRM's email template system is not capable of what you describe out of the box. As you have discovered it will only permit you to insert placeholders from, or assocated with, the primary entity. It won't let you insert fields from other entities. What you suggest as a workaround is possible but it's not an ideal solution as you'll have these 2-4 redundant fields on each record type that contain duplicated data from the price list.
If you have any experience with creating custom workflow activities using the SDK then the best solution here is to create a custom activity that accepts either an draft Email or Email template as a input parameter, instantiates the email if required, loads the price list data, and performs your own custom placeholder replacements.
I've done this on a few projects in order to pass multiple entity records into the template, or to insert complex tables into emails by loading data from relationships. See the screenshots below for an example of how I've configured the email template and dialog process to pass both an 'Account' and 'User' record into the email template.
My Account entity has an Account Manager field. I would like to add this same field to Opportunity as a reference. Is there a way to add this field to Opportunity and make it point to the attribute "Account.Account Manager"?
I am using MS Dynamics CRM 4
What you're asking for is copying the field "Account Manager" in entity "Account" to entity "Opportunity", is it?
If that is what you want, you need to create a field named "Account Manager" (or whatever you wish to) in the "Opportunity" entity form; the field type being the same. And you need to have some kind of workflow/plugin/javascript to update the field in "Opportunity" form with the same value as present in the "Account" form.
EDIT: Based on your comment, I've edited the answer. You can achieve it by two means:
Have some kind of workflow/plugin populating the field in
Opportunity form from that of the Account form.
Fetch the value of the Account field by javascript on Opportunity
form load and display it in a field.
Also, you might want to make the field read-only in Opportunity form.
I have a workflow that will fire once a form field changes. The workflow checks the value and then sends an email if one particular value is selected. That much I've managed to figure out.
Now I need to pull a field value from a separate entity to populate the "to" field of the email. We have a Configuration entity that stores the value of a distribution list - we want to pull this into the email that the workflow generates.
I've created an N<>1 relationship between the primary entity and the Configuration entity, however I only see the Entity and not the entity's Fields in the email form assistant. Any idea how I can pull that data onto the email form?
If you see the entity populated under "Look for" and then in the drop down under that you see no values? I'm guessing in your configuration entity your email address you want to use for the email recipient is a text field. In order for the form assistant to populate the second drop down, the field types must match up - or in this case for a field to show up as useable for the "To" field, it needs to be an Account, Contact, User, etc... values you can send an email to.
My suggestion is create a Contact record that has the proper email address and either relate that to your base entity in place of your configuration entity (if possible) or relate your configuration entity to Contact and populate the new lookup on the configuration entity accordingly.