Hi Melanie, From the sound of it, you only have three options here: Write a plugin that will trigger on the pre-create message, which will retrieve the count of the related records and validate against the number set. Once validated, if the count is less than that of the max, then the process will proceed, else you will throw an error to the user alerting them that they cannot proceed. Write a custom workflow activity / action (plugin attached) that will retrieve the number of records in a workflow based on the relationship passed in, and from that Output Parameter you can determine if it falls below the max, and if not, you can add a "Stop Workflow" step in with a message for the user. Write custom javascript code that will run when a new record is being opened or when it is being saved. The code will retrieve the related records via a WebAPI call (asynchronous) and validate against the max count, at which point the user can be prompted with a message that will not allow them to proceed. Unfortunately there's no way to achieve this functionality out of the box, as 1:N relationships cannot be retrieved or interacted with in workflows without some sort of customization. If you need assistance or some direction, please let me know and I can give you a starting point for whichever option seems most reasonable for your situation. Thank you! Matt Bayes
↧
Forum Post: RE: How do I retrieve the number of records in the 1:N relationship from Account to Opportunity (the customer one)? I want to limit the number of opportunities that can be created for a given account
↧
Forum Post: RE: Unified Interface - Xrm.Navigation.openWebResource - "no data found"
Here is the screenshot. It would seem that the html returned seems to be just a "blank" container. It does not look like it has loaded my web resource in at all.
↧
↧
Forum Post: RE: How do I retrieve the number of records in the 1:N relationship from Account to Opportunity (the customer one)? I want to limit the number of opportunities that can be created for a given account
Hello, You will have to call this function on your opportunity form, when you change the account field this function has to be called, it will check if the selected account has more than 10 opportunities: function checkNumberOfOpportunities() { var lookupObj = Xrm.Page.getAttribute(lookupSchemaName); //Check for Lookup Object if (lookupObj != null) { var lookupObjValue = lookupObj.getValue();//Check for Lookup Value if (lookupObjValue != null) { var lookupEntityType = lookupObjValue[0].entityType, //To get EntityName lookupRecordGuid = lookupObjValue[0].id, // To get record GUID $.ajax({ type: "GET", contentType: "application/json; charset=utf-8", datatype: "json", url: Xrm.Page.context.getClientUrl() + "/api/data/v9.0/opportunities?$select=_accountid_value&$filter=_accountid_value eq "+lookupRecordGuid+"", beforeSend: function(XMLHttpRequest) { XMLHttpRequest.setRequestHeader("OData-MaxVersion", "4.0"); XMLHttpRequest.setRequestHeader("OData-Version", "4.0"); XMLHttpRequest.setRequestHeader("Accept", "application/json"); XMLHttpRequest.setRequestHeader("Prefer", "odata.include-annotations=\"*\",odata.maxpagesize=10"); }, async: true, success: function(data, textStatus, xhr) { var results = data; for (var i = 0; i = 10) Xrm.Utility.alertDialog("Account already has 10Opportunities"); } }, error: function(xhr, textStatus, errorThrown) { Xrm.Utility.alertDialog(textStatus + " " + errorThrown); } }); }
↧
Forum Post: RE: refresh page without javascript
Hi Hedi, Unfortunately it is not possible to refresh without the inclusion of some sort of Javascript code. Since a browser refresh is client-side, the only option is to utilize client-side code (ie. Javascript). Plugins and other CRM customizations are server-side and thus cannot be used. Thanks. Matt Bayes
↧
Blog Post: Web API “An error occurred while validating input parameters”
Today I had this error in my JS Web Api request: {“error”:{“code”:”0x0″,”message”:”An error occurred while validating input parameters: Microsoft.OData.ODataException: An undeclared property ‘mm_account’ which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values. The code was generated through CRM REST Builder, which is a fantastic tool developed by Jason Lattimer MVP for generating JS requests. The particular request was updating an entity field. Field’s name was “mm_account” and schema name was “mm_Account”. Finding was for some reason generated code was using field name instead of schema name. Changing name fixed this issue. I hope sharing this will save someone’s time
↧
↧
Forum Post: Disable Change Email functionality in Customer SelfService Portal
Hello, Is there any way to disable the 'Change email' functionality in the Customer Selfservice portal? I have reviewed all site settings, almost everything is possible except disabling this property. Even with user permissions and workflows, I cannot prevent a user from changing the field. We need to keep governance on the email value. It can only be changed if we personally review the requested change. We want it completely disabled for portal-users. Any advice on this? thanks in advance, Regards KVR
↧
Forum Post: RE: Dynamics 365 Fetchxml ssrs report Issue
The general approach should be as per the first expression - i.e. the Sum function should be in the outside. From what I can see, the first expression is summing a 0, rather than any other field If may help to break the different parts of the expression into separate calculated fields, and display each while you test it
↧
Forum Post: RE: Mapping D365 CRM optionset with KingswaySoft for data migration
Hi Kokulan, May be I was not clear in my query. I have already gone through the provide link. Thanks for the link. In the screenshot provided by me, I am able to retrieve only those attributes which are on nvarchar type under Input column field. But the optionset has values which is of integer type. I am not sure why optionset attribute is not populating in CRM Optionset Mapping Editor. Need help in retrieving the optionset attribute in Input column field which comes under CRM Optionset Mapping Editor. Regards, Verma
↧
Forum Post: RE: Workflow error for large set of data.
Hi Your action could be failing for invalid data. When you run this with small sets of data, number of exceptions are low and within the threshold limit. When you execute with large set, the total number of exceptions thrown by action goes over threshold limit and this causes the workflow execution to be postponed I would revisit the action and check the failed logs and see why they are failing and see if you can add validations or conditions to avoid these exceptions. Please refer to the link below as well, similar issue reported before stackoverflow.com/.../exceptions-in-code-activities-used-in-crm-workflows Hope this helps
↧
↧
Forum Post: RE: Data Export does not seem to contain TeamMembers, StringMap or ProcessStage
I found TeamMembers under Relationships (Doh!). Still can't find StringMap and ProcessStage.
↧
Forum Post: RE: Portal - Scope/Permission Error
"No man can serve two masters: for either he will hate the one, and love the other" - Book of Matthew 6:24 This was the root of the problem. First, I changed my permission structure to the following: 1. "My Accounts" - Contact Scope for Account Entity 2. "My Account's Leads" - Account Scope for Lead Entity 3. "My Account's Lead's Claims" - Parent Scope (under "My Account's Leads") for Claims entity. This caused the YSOD to go away and be replaced by a "normal" error - one with a correlation ID. I enabled diagnostics and pulled the error from an Azure Blob: the AccountID had a value of Guid.Empty. After trying to determine why Global Scope Account permissions didn't cause this error but Contact Scope did, I had to submit. Having two referential relationships was the issue...and one that I ultimately couldn't resolve. I removed the Account lookup from the form and will now use Entity Metadata to set it on Save. This has at least allowed me to proceed; thankfully, the requirements are fluid enough that this should pass muster. This is the sandbox, but when this is moved to production, I think the best solution is to avoid creating two referential relationships in the first place. This error did not occur using CRM forms.
↧
Forum Post: RE: Portal - Scope/Permission Error
"No man can serve two masters: for either he will hate the one, and love the other" - Book of Matthew 6:24 This was the root of the problem. First, I changed my permission structure to the following: 1. "My Accounts" - Contact Scope for Account Entity 2. "My Account's Leads" - Account Scope for Lead Entity 3. "My Account's Lead's Claims" - Parent Scope (under "My Account's Leads") for Claims entity. This caused the YSOD to go away and be replaced by a "normal" error - one with a correlation ID. I enabled diagnostics and pulled the error from an Azure Blob: the AccountID had a value of Guid.Empty. After trying to determine why Global Scope Account permissions didn't cause this error but Contact Scope did, I had to submit. Having two referential relationships was the issue...and one that I ultimately couldn't resolve. I removed the Account lookup from the form and will now use Entity Metadata to set it on Save. This has at least allowed me to proceed; thankfully, the requirements are fluid enough that this should pass muster. This is the sandbox, but when this is moved to production, I think the best solution is to avoid creating two referential relationships in the first place. This error did not occur using CRM forms.
↧
Forum Post: RE: Resend email for Excluded Accounts from Campaign Activity
Hi there, This happens when the accounts have the setting Bulk Email = Not Allowed, under the section CONTACT PREFERENCES at the Details tab. Reference: 'donotbulkemail' attribute ( docs.microsoft.com/.../account
↧
↧
Forum Post: How to pass values from html webresource to javascript on window close
Hello, I am opening html webresource using xrm.navigation.openwebresource but on closing of html window i want to pass values from html to javascript file from where it is opened . Is there call back function can be implementes ? If i open html window using window.open i can call parent javascript function using window.opener.functionname on close but click but i want to know how i can pass values to parent javascript file on close button click of html window.
↧
Forum Post: RE: Call Secured App Service Web API from CRM dynamics portal page
Hi Emad, Your best bet to is to use the OAuth 2.0 implicit grant flow, as described here: docs.microsoft.com/.../oauth-implicit-grant-flow Long story short, you can get a token issued by the Portal that you can pass to your API. That token contains information on the person (contact) logged into the portal that you can trust via validation. This method works regardless of what authentication mechanism you are using on your portal. Hope that helps. Nick
↧
Blog Post: User Group Summit 2019 Recap
It’s been a week since User Group Summit in Orlando! This was a great week of learning and networking. I presented many times and also hosted the 3rd annual DMV Summit Happy Hour. Patrick Wright and I presented some basics for new Dynamics 365 administrators. These sessions have also been scheduled for repeat webinars in January so make sure you get registered for Part 1 and Part 2 ! For those who attended, make sure you check out the presentation materials and recordings (if purchased) in the Summit Community. If you were not able to attend, see my takeaways and photos below. Five DYSFUNCTIONS of Dynamics Teams I started the conference off with Chelsea Schlepp talking about getting teams to work together effectively. We talked about lessons learned from The Five Dysfunctions of a Team by Patrick Lencioni. There is a pyramid of issues that teams need to work through to be fully effective. These dysfunctions need to be resolved in order as each builds on the next. This includes: Absence of Trust > Fear of Conflict > Lack of Commitment > Avoidance of Accountability > Inattention to results. For each of these issues we walked through the characteristics and some exercises to resolve. I recommend you check out the book to learn more. There is also a assessment available in the book to evaluate areas your team might need to work on. 20 Flow Design Tips As I already know about Dynamics workflows, I am working to translate this into Flow knowledge. So I attended this fast paced Flow design session with Jerry Weinstock . Here are a few of the main tips I took away: Build iteratively: Build a bit, test, keep going Use Dynamic Content: If you are hard coding anything, ask yourself if there is a better way Variables and Compose: If you just need to store a value use Compose. If you need to set multiple times, use a Variable. Start with a button: Use a button to manually trigger your flow before you wire up any automatic triggers What to Do when your Flows Don’t Flow Ed Gonzales shared his Flow mantra in this session: Try, Fail, Learn, Repeat. The Flow checker will show you many common issues but when those fail there are 5 problem solving tips: Keep it simple Use your tools Don’t get discouraged Think around the problem Help Others You can learn more about these tips on Ed’s blog . Upgrade Much? With the twice yearly updates to Dynamics 365 Online, we need to be constantly ready for change. So in this session on Tips on Continuous Upgrading in the new D365 CE World Beth Burrell shared some information to keep in mind. As I mentioned, Online receives updates twice a year in April and October. Additionally ad-hoc updates are rolled out on a weekly basis with no way for the customer to opt out. This could include new features, security updates or other changes. It is important to know how to test and handle these items. Management needs to understand that these updates will take time and resources. It is important to test the changes in a sandbox environment during a code freeze or a fully separate environment (but still with your customizations). This should be tested by users with testing scripts they have written. Any resolved issues need to be documented and then you should do the upgrade multiple times to ensure you have all the steps. It is very important to be on the lookout for security changes. Security Roles are getting more granular and it is possible for changes to be rolled out that cause access issues for your users. Keep in mind new permissions will not be automatically added to copied or custom Security Roles so you will need to find and make those changes yourself. 5 Steps to Create PowerApps for Any Device Jonas Rapp spoke in the Power Zone (the Silent Disco of conferences) on creating responsive PowerApps. Here are his rules:\ Disable scaling Size: work with form elements to adjust the size Position: everything needs to be relative to other controls and orientation Spatial awareness: this will take some testing with a focus on usability Geometry: you will have to do some math We also discussed using the default Tablet experience as this allows you to change the size and set portrait versus landscape. Also remember that the designer and preview always scales so you will need to publish to test. The other interesting tip was to use a separate page to store your calculations for height and width. This will give you a visual way to test and also allow you to grab those values from one place. Microsoft Flow Integration for CRM Administrators Last but not least, I joined Chris Cognetta and Jerry Weinstock to talk about how they are using Flow as an integration platform. They are integrating huge systems and are working to on using a mapping custom entity in Dynamics so that the integration can be controlled by internal resources and changes made easily. They are also using a custom entity to keep an integration log. This is helpful so administrators have one place to look to see the status of all Flow integrations and review if errors need to be resolved. A quick tip shared was around data validation. Flow does not handle null values very well. So always check that the values received are in the expected range. If not, these can be logged as errors at the beginning and do not need to run through the full process. You can also use Flow to monitor Flow! This means you can create admin Flows to do things like send notifications when new Flows are created or for errors. Some Flow conditions were also discussed. Switch case can be used to have a different set of actions performed depending on the value used. Keep in mind, if a new value is added the switch will not automatically update or notify you. Instead it will use the default case. There is also the Configure Run After action that can trap errors and prevent the whole Flow from failing. You should also review the Environment Variables and how these can be used to store data for your different environments to prevent needing to manually edit after migrating. To go deeper into these concepts check out the whitepaper on Building Enterprise Ready Flows , Pictures That’s all the sessions I had time for! Be on the lookout for encore webinars for my sessions and enjoy some pictures below. I hope to see all of you at the next User Group Summit in Nashville! Hashtag and I got to solve some problems with the Medics Headphones for the Silent Disco Power Zone Sessions Some crazy friends at the House of Blues Hashtag warming up for Karaoke at the House of Blues Presenting on getting starting with Automation as Tigger DMV Happy Hour 2019 DMV Happy Hour 2019 The post User Group Summit 2019 Recap appeared first on Kylie Kiser .
↧
Forum Post: RE: How to pass values from html webresource to javascript on window close
Hi Krishna, You can do following way.Let say I have a JS library which register in the parent form and having a callback function , let say - CallbackSetAddress() - if (typeof (CF) == "undefined") { CF = { __namespace: true }; } CF.Utility = { CallbackSetAddress: function (addressObj) { if (addressObj != null && addressObj != undefined) { Xrm.Page.getAttribute("address1").setValue(addressObj.Address1); } }, _namespace: true }; Now from web Resource access the parent function using window.parent.opener like below- function OnWebResourceClose() { var selectedAddress = null; selectedAddress["Address1"] = "Line 1"; window.parent.opener.CF.Utility.CallbackSetAddress(selectedAddress); window.close(); }
↧
↧
Forum Post: RE: Delete report snapshots?
Have you found a solution? I have this same issue. I can't delete because I get an error. Leaving this in hope to revitalize it.
↧
Forum Post: Linking Bank account in UK
Hello, I am want to link a Lloyds Bank account UK to Business central but its only showing me the USA and Canada option
↧
Forum Post: RE: Disable Change Email functionality in Customer SelfService Portal
If you set the "Authentication/Registration/EmailConfirmationEnabled" Site Setting to "false", that option should disappear. Nick
↧