Im using dynamics CRM 2011.
I took a look at the entity called contact.
This entity has a fullname primary field that is automatically populated.
This field is not visible to the crm user when creating a new contact.
I was wondering how do I achieve the same with custom entities?
Do I use workflow to update the primary key field and hide the field from the crm users?
Thanks
That would be one (and the easiest) way to do it, stick a workflow on the create and update of the relevant fields - though users would have to wait a couple of minutes to see the change.
Other options could be a plugin if you want the field to be updated synchronously, or you could use JavaScript to show the field before the record is saved.
You could use the a AutoNumber Plugin here, there is one on CodePlex (I havent used it myself): http://crm2011autonumber.codeplex.com/
Related
I want to create a custom field in the agent new ticket screen.
I want the field to be shown as a dropdown list where the values in the dropdown list will be values taken from an API of other service.
I know Zendesk custom fields have an option to upload a csv file with options but since I want to the values to be live updated it won't work for me.
I'm wondering whether I need to create a plugin that will do that job or Zendesk have a solution for this need.
I am not sure this is a suitable stackoverflow questions, but if you have control over the backend of the other service, it is better to automate a call from it to Zendesk custom fields API whenever there are changes to the drop down options.
However, this is a bad idea in the first place because drop down options are associated to tags. There might be conflicts with other field options or other tags used by agents. This will be a nightmare for the data analysts who rely on tags for Zendesk Explore reports, especially if you delete an options and its associated tags.
I'm using the WorkFront / AtTask API and when looking up Tasks, I'd like to filter them down to the Projects that contain specific Roles.
using /TASK/search/?fields=project:roles it will show me the Roles, but then I'm not sure how to filter on those.
Accessing a tertiary object directly (fails)
I tried /TASK/search/?project:roles:ID=aaaaaaa but the API returns (422) Unprocessable Entity.
Access from the parent object (works)
task -> project -> /PROJ/search/?roles:ID=aaaaaaa works, but involves sub-queries to the API that are costly and slow.
Access from secondary object's ID fields (works)
/TASK/search/?project:ownerID=bbbbbbb since it references a field of a secondary object and not yet another object. But I've only been able to make this work with single-instance references and don't know how to access the ID fields of collections without referencing them as objects.
So how could I filter or access down to a secondary object's collection? I can view them in a single API query, but can't seem to filter.
Task > It's Project > filter by Role
This functionality is not available in Workfront, neither through the API nor through built-in tools like Reports. This is due to a constraint on the database side of things. After seeing this question I spoke with my enterprise support team at Workfront and received confirmation of this from the DBAs.
The solution that you provided is the best you can do - split this query into the front and back half of your parameters and filter results within your code.
The best solution I can think of thus far is:
Pull the list of acceptable projects based on role.
/PROJ/search/?roles:ID=aaaaaa&...
Save the list of projects in memory
Pull the list of Tasks in question
/TASK/search/?...
Remove the tasks that don't have a project ID from step 2
This way it's only 2 queries and the project query should have a minimal impact in terms of size and number of entries.
Accordint to this blog one can hide the business process flows. I'm trying to follow it but there's no flows defined for my opportunity (according to the list).
I'd like to "delete" the flow for Opportunity entity (or at least affect it somehow to display different steps/different number of steps). The reason is that we'll be migrating from an older version and they've got a picklist with percentages of the deal being done. Not sure how to map it onto the Opportunity in 2013 and even if, I'm not sure the client'd like it.
Is it at all possible to remove business process flow from Opportunity in CRM 2013?
When I do follow the guide and fool around with all flows, I get to remove the one for Opportunity but then I'm shown the error message as in the image below. So I'm assuming that it's not the correct approach. Or did the blogger referred to in the first paragraph cheat and took his screenshot after closing the warning? :)
The blogger in the blog is using the earlier version of Dynamics CRM than yours. Newer versions of Dynamics CRM will show the above warning.
Beside one way in the blog, there are a couple of way to show/hide Business Process Flow:
use Javascript to set the display attribute of process bar element:
function hideBusinessProcessFlow()
{
document.getElementById('header_process_d').style.display = "none";
}
function showBusinessProcessFlow()
{
document.getElementById('header_process_d').style.display = "block";
}
Reference: https://community.dynamics.com/crm/b/misscrm360exploration/archive/2014/07/24/show-and-hide-business-process-flow-in-crm-2011-2013.aspx
Please note that this is unsupported customization.
Update processid and stageid fields of the record. Use update these fields with Javascript or writing a plugin/workflow to do this.
Have a look at this solution: http://code.msdn.microsoft.com/Change-Dynamics-CRM-2013-a6beb85e
In your case, you just need to update processid and stageid fields to null, then the annoying warning will disappear.
Good luck!
Are you looking at the complete list of Processes under Customisations? If you're looking at an unmanaged solution it won't appear unless it's been added to that solution. It's in there OOB and called Opportunity Sales Process, I just deactivated it on a clean org. No need to delete it, just deactivate it or edit as required.
There are two things that can be done for any business process flow in MS CRM:
Deactivate BPF
Delete BPF
In order to remove Business Process Flow (BPF) from existing records, it is not enough to just deactivate BPF. Even when we deactivate BPF, records that are associated with it will still show BPF with warning message that it is deactivated.
It is true, if you delete BPF from Processes in MS Dynamics CRM, they will be removed (not showed) from the records that were associated with that BPF. However, what if you do not want to delete default BPFs, like those related to sales process on system entities (Leads, Opportunities and Accounts)? What if you want to hide these default system BPF from default system entity (i.e. Opportunity)?
In this case you need to write plugin/workflow activity to remove association of the entity record from BPF.
See my GitHub example how to do this
This MS CRM community post is also useful:
Remove business Process Flow from Account
I've got a lookup field on Account entity called something. Each such Something has a reference to an account. When my users click the magnifying glass, I want them to see a list of available Something records but filtered to view only such instances that link to the currently treated entity.
Also, I'll need to design such a filtration for Contact instances to only show the Something records that are related to the account that the currently regarded contact is a member of.
I can't decide between a plugin on Retrieve and some JS in OnLoad registering a fetchXML. All such operations will be done client-side. The solution needs only to work in CRM13 (and if possible apply some cool functionality in that version).
Suggestions?
JavaScript & FetchXml are your best option here as with a Retrieve plugin you're taking the performance hit of executing on every retrieve regardless of whether the entity is being retrieved for the lookup. A filtered lookup in JS only applies for those scenarios that require a change to the field on Account.
Another other good reason for using a filtered lookup in Js is they are now a supported feature in CRM 2013 as opposed to the "hack" that was required in 2011.
Some more info on addPreSearch and addCustomFilter can be found on MSDN and there's a decent blog post providing examples here.
The documentation for the Dynamics security model (msdn.microsoft.com/.../gg334673.aspx & msdn.microsoft.com/.../gg328567.aspx) states that in order to relate two records together a user needs Append To and Read privileges on the parent Entity and Append and Read permission on the child Entity.
In practice it seems like a Dynamics CRM 2013 subgrid will not let a user relate records unless they also have at least user level Create privileges on the child Entity. Using the Dynamics SDK to relate two records together works as expected, however when in the Dynamics UI, clicking on the '+' button to begin in a subgrid to relate two records together does nothing unless the user has Create privileges.
Curiously I've also noticed that while clicking on the '+' button does nothing, if I refresh the page afterwards I always get one of those "Dynamics has encountered an error" popups, perhaps this is a bug with Dynamics?
At any rate this is a pretty breaking problem for us as we have plenty of “reference data” Entities in an N:N relationship that users should be able to relate existing records with, but not create new records.
Is anyone else aware of this problem? Is there some kind of workaround or setting that I'm missing?
(Link to issue on Dynamics CRM forums: https://community.dynamics.com/crm/f/117/t/119729.aspx)
When you click on the "+" on the sub-grid your sub-grid may create a new record or may give you an option to associate a record, depending on how your child entity is configured. For completeness, I'll detail how to either get the option to associate or to create a new record.
To Give an Option to Associate
On the child (e.g. Contact) The look-up to the parent record (e.g Account) cannot be required. If the look-up is required CRM will automatically create a new form (Contact in this example) and pop it into a new tab/window. If this is your issue and you need the look-up to the parent to be required, you may want to make the look-up to the parent non-required and then require the field using on-load javascript.
To Create New Record & Pop into new Tab / Window
Require the look-up to the parent on the child account, or;
Hide the "Add Existing" button on the child record using your ribbon editor of choice
I raised this issue with Microsoft and they have formally recognized it as a bug. The fix is due to be released in Update Rollup 2.
It's a known bug and already fixed in update rollup 2