Quantcast
Channel: Microsoft Dynamics CRM
Viewing all 154803 articles
Browse latest View live

Forum Post: RE: Js Web Resource executes 2 times

$
0
0
yes it executed 1 time after commenting all code

Forum Post: RE: Updating a lookup in a custom entity through plugin

$
0
0
if you registered your plugin on a synchronized mode the system will pop an exception of an infinite loop i think you need to debug you code and see where the problem reside and remove all your exceptions handling from your plugin to let the system popups the exceptions that occurs

Forum Post: RE: Js Web Resource executes 2 times

$
0
0
Bro actually i created one more JS web resource in which i wanted to insert that code in which BPF change on form load but that web resource do not execute when form load so it cut code from that web resource and injected this web resource in which button disable on certain stage

Blog Post: Dynamics 365 Unified Interface

$
0
0
Upcoming in Dynamics 365: Unified Interface With the imminent October 2018 release , Dynamics 365 users find themselves facing one of the most transformational updates in years. Much like the transition between CRM 2011 and CRM 2013, when the interface transformed from tabs on the left to tabs on the top, we are now back to tabs on the left again! This is all due to the deprecation of the beloved Web interface that has been the default interface for years, and its replacement - the Unified Interface . The new interface is fairly quick to learn and easy to grasp. For end users, the Unified Interface offers a much friendlier and cleaner overall experience . All new organization starting to use Dynamics 365 after September 2018 will have the Unified Interface turned on by default, while existing organizations are highly recommended to begin the transition. Image courtesy Microsoft Dynamics Team Blog So why are we seeing this transition now? Well, the Unified interface offers CRM users and developer something that has never been available, a single easy to understand that works the same whether accessing CRM data through a web browser, mobile app or through Outlook App. This single interface allows developers to design once and have that interface reflow itself and appear consistent no matter how users access their data. Right away, you'll notice a new interface, along with new navigation and a very clean interface. Site map navigation is along the left side of the screen and can be opened or closed. When you open a record , instead of needing to scroll to the bottom of a page, you can click on tabs to move around. Subtle uses of color and lines separate sections and fields. Field labels are not cut off if they run on too long. And a new Post control shows Posts, activities, notes all in a single timeline. This timeline can be filtered and sorted based on different dates.  Most of the core functionalities remain similar, but some enhanced capabilities are introduced   Timeline Control - allows for better collaboration with your team. The way this is accomplished is by providing a quick way to see the entire communication thread. Along with the new Unified Interface comes the capability to see all of your teams interactions in a single view. This includes emails, notes, posts, voice attachments, and combined/ custom activities . Enhanced filtering views are also available. With the Unified Interface, you will be able to filter by the type of activities you want to see. Reference Panel - The reference panel is a great way to get work done without having to click out of the screen. You can search for things within the context of the record you are viewing. Reference Panels can be used with all entities in the interface. To learn more about the great new features of the Unified Interface, visit  http://bit.ly/2QOCCo5 The post Dynamics 365 Unified Interface appeared first on CRM Software Blog | Dynamics 365 . Related posts: What Microsoft Dynamics 365 means for CRM pricing and competition Do You Really Need CRM to Grow Your Business? Stay More Organized at Work With Dynamics 365

Forum Post: RE: Notify if no Activity logged for the Opportunity

$
0
0
Trigger a wait workflow to wait 15 days on creation of the record and get the date difference between the execution time and rollup filed date. If it is less than 15 days create a new wait job the trigger time is rollup filed value + 15 days, If the difference is 15 days or more then send the notification.

Forum Post: RE: Want to add the CRM Charts on Portal home page

$
0
0
Thank You, It worked. Thanks Again :)

Forum Post: RE: Refresh When Xrm.WebApi.updateRecord finishing Execution

$
0
0
Hi, 1. Have you tried creating your own synchronous update request with the web api ? 2. If you are updating multiple records, have you tried creating a batch request and refreshing the grid after that // Maybe it could be something like this // I have not tested this at all, just thought it could possibly help in your case function success(result) { var data = []; data.push('--batch_123456'); data.push('Content-Type: multipart/mixed;boundary=changeset_BBB456'); data.push(''); for (var i = 0; i < results.entities.length; i++) { data.push('--changeset_BBB456'); data.push('Content-Type:application/http'); data.push('Content-Transfer-Encoding:binary'); var id = i + 1; data.push('Content-ID:' + id); data.push(''); data.push('PATCH ' + Xrm.Page.context.getClientUrl() + WEB_API_URL + 'opportunityproducts(' + result.entities[i].opportunityproductid + ') HTTP/1.1'); data.push('Content-Type:application/json;type=entry'); data.push(''); var tauxDeMarge = Xrm.Page.getAttribute("tool_tauxdemarge").getValue(); var tauxDevise = Xrm.Page.getAttribute("tool_tauxdevise").getValue(); var fraisDapproche = Xrm.Page.getAttribute("tool_fraisdapproche").getValue(); var prixDachat = result.entities[i].tool_prix1; var remise = Xrm.Page.getAttribute("tool_remise").getValue(); var var0 = remise/100; var var1 = 1-var0; var var2 = 1+tauxDeMarge; var var3 = (prixDachat*var1*var2)+prixDachat; var data = { "tool_fraisdapproche": fraisDapproche, "tool_tauxdemarge": tauxDeMarge, "tool_tauxdevise": tauxDevise, "tool_remise": remise, "tool_prixdevente": var3 }; data.push(data); } data.push('--changeset_BBB456--'); data.push('--batch_123456--'); var payload = data.join('\r\n'); $.ajax( { method: 'PATCH', url: Xrm.Page.context.getClientUrl() + WEB_API_URL + '$batch', headers: { 'Content-Type': 'multipart/mixed;boundary=batch_123456', 'Accept': 'application/json', 'Odata-MaxVersion': '4.0', 'Odata-Version': '4.0' }, data: payload, async: false, success: function (data, textStatus, XmlHttpRequest) { Xrm.Page.getControl("opportunityproductsGrid").refresh(); }, error: function (xhr, textStatus, errorThrown) { //Handle error conditions } }); } Hope this can help you somehow

Blog Post: Working on Lookup field of Dynamics 365 in Power BI

$
0
0
Introduction: Recently, we had a business requirement to show lookup fields name in our Power BI Reports. In Power BI Lookup columns show its guid and not name. So after some research and play around we found a solution to this problem. We achieved it by using LOOKUPVALUE function. Here as you can see in below screenshot Primary Contact is showing with guid and not directly with name on Account table, so to show lookup value with name instead of guid, we can make use of LOOKUPVALUE function in our report. Steps to show Lookup name: 1 . At first Add new column for the lookup field. In Our case field is primary contact. please check below screenshot: 2 . Now we can set LOOKUPVALUE function on our newly created column above, as you can see in our below screenshots: Once we added new column in table it looks like as below: Now in the second step, we need to implement LOOKUPVALUE function in our column. You can also change the name of column. In our case we have changed it with Primary Contact. a. LOOKUPValue(Target table result field, Target table key, Source table matching key as on Target table) b. For Example In Our case the expression look like below: LOOKUPValue(contacts[fullname],contacts[contactid],accounts[_primarycontactid_value]) Once done with it we will save it by clicking on icon highlighted in red rectangle below: 3 . Now as you can see in below screenshot Primary Contact names are added in newly created columns i.e. Primary Contact. Conclusion:  With the above simple steps and using LOOKUPVALUE function we can show data from other table easily without having any relationship, but make sure that there should be common key present in both tables.

Forum Post: RE: Refresh When Xrm.WebApi.updateRecord finishing Execution

$
0
0
Hi Take total record count to a variable. You can do it on parent.Xrm.WebApi.retrieveMultipleRecords(..) success method then add a success block to Xrm.WebApi.updateRecord("opportunityproduct", result.entities[i].opportunityproductid, data). In Xrm.WebApi.updateRecord method success block validate the current "i" value and total record count. If both are equal you can refresh the grid.

Forum Post: RE: Updating a lookup in a custom entity through plugin

$
0
0
Hi, It stopped tracing the traces given in the beginning of the plugin which were earlier working fine.. And now its coming as: 5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 result is not null 8b7f5d95-c1c0-e811-8130-c4346bdcf1a1 and so on same as this... Whats this issue?

Forum Post: RE: CRM 2016 On Premise - Deletion of a Canceled System Job causes an error

Forum Post: Stop record creation from Pre-validate Plugin without throwing exception

$
0
0
Hello Techies, I have a pre-validate plugin for duplicate detection. based on the criterion if there is duplicate records found, I want to stop the record creation without throwing the Invalid Plugin Execution Exception. Thanks in Advance. Viswa

Forum Post: Updating both connection entities for a relation

$
0
0
Hi, We are storing a connection guid on a custom entity. Then we want to update the connection entity that has this guid. We want to update a custom field on the connection entity. The question is, what is the best way to update both connection entities which are related. Because when we update the connection entity with the selected guid, the other symmetric one is not getting updated. Do I need to query again and find the corresponding connection entity and set the custom field again on that one too? Is there a better way? Thanks, Refer to: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/connection-entities """When you create a connection entity record, two records are created in the database. The first record represents a source to target connection and the second record represents a target to source connection. This guarantees that a query will find all connections that the record participates in, regardless whether the record is a source record or a target record in the connection."""

Forum Post: RE: Version number mismatch in Admin portal

$
0
0
Still showing 9.0 in the traditional Admin Portal instance picker, though the PowerApps version still shows 9.1, as does "help/about" inside the web client. Hopefully this is just a display issue...

Forum Post: RE: Authenticated User Cannot access records in Portal

$
0
0
Hi Dmytro, Didn't added entity permission on Entity list and form. Once enable permission check box in entity form and assign entity permission to web role. Even web admin cannot open the record from invoice list, Have provided Account level and only read access to invoices. 'You do not have sufficient permission' Thank

Forum Post: RE: Updating a lookup in a custom entity through plugin

$
0
0
Hi Guys, this is the complete code that i have written: public class CRMDuplicate : IPlugin { public void Execute(IServiceProvider serviceProvider) { int fetchCount = 900; int pageNumber = 1; // //Extract the tracing service for use in debugging sandboxed plug-ins. ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); // Obtain the execution context from the service provider. IPluginExecutionContext context = (IPluginExecutionContext) serviceProvider.GetService(typeof(IPluginExecutionContext)); IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); // For this sample, execute the plug-in code only while the client is online. if (context.IsExecutingOffline || context.IsOfflinePlayback) return; try { // The InputParameters collection contains all the data passed // in the message request. if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity) { // Obtain the target entity from the Input Parameters. tracingService.Trace("Target entity is wineorder"); Entity entity = (Entity)context.InputParameters["Target"]; tracingService.Trace(entity.LogicalName); if (entity.LogicalName != "new_wineorder") return; if (entity.Attributes.Contains("new_customer")) { tracingService.Trace((entity.Attributes["new_customer"]).ToString()); } EntityReference customerId = (EntityReference)entity.Attributes["new_customer"]; if (customerId.Id != Guid.Empty) { tracingService.Trace(customerId.Id.ToString()); } Entity contactCRM = RetrieveEntityById(service, "contact", customerId.Id); tracingService.Trace("WineOrderContactFound"); string v360id = contactCRM.Attributes["pager"].ToString(); // Get Pager of Customer which is in Wine Order Customer lookup tracingService.Trace(v360id); QueryExpression query = new QueryExpression { EntityName = "new_goldencustomermapping", ColumnSet = new ColumnSet(true) }; query.Criteria.AddCondition("new_goldencustomerid", ConditionOperator.Equal, v360id); query.PageInfo = new PagingInfo(); query.PageInfo.Count = fetchCount; query.PageInfo.PageNumber = pageNumber; query.PageInfo.PagingCookie = null; EntityCollection response = service.RetrieveMultiple(query); while (response != null && response.Entities != null) { if (response.Entities.Count > 0) { Console.WriteLine("Do Nothing. Customer is GoldenCustomer"); break; } else if (response.MoreRecords) { query.PageInfo.PageNumber++; query.PageInfo.PagingCookie = response.PagingCookie; response = service.RetrieveMultiple(query); } else { UpdateCustomerID(entity, response, v360id, service, serviceProvider); } } } } catch (Exception ex) { throw ex; } } private static void UpdateCustomerID(Entity entity, EntityCollection response, string v360id, IOrganizationService service, IServiceProvider serviceProvider) { int fetchCount = 900; int pageNumber = 1; QueryExpression query = new QueryExpression { EntityName = "new_goldencustomermapping", ColumnSet = new ColumnSet(true) }; query.Criteria.AddCondition("new_v360id", ConditionOperator.Equal, v360id); query.PageInfo = new PagingInfo(); query.PageInfo.Count = fetchCount; query.PageInfo.PageNumber = pageNumber; query.PageInfo.PagingCookie = null; EntityCollection result = service.RetrieveMultiple(query); while (result != null && result.Entities != null) { if (result.Entities.Count > 0) { Guid contactID = GetGoldenRecordCRM(service, result, serviceProvider); if (entity.LogicalName == "new_wineorder") { entity.Attributes["new_customer"] = new EntityReference("contact", contactID); break; } } else if (result.MoreRecords) { query.PageInfo.PageNumber++; query.PageInfo.PagingCookie = result.PagingCookie; result = service.RetrieveMultiple(query); } else { Console.WriteLine(result.MoreRecords); } } } private static Guid GetGoldenCustomerCRM(IOrganizationService service, EntityCollection result, IServiceProvider serviceProvider) { Guid contactID = Guid.Empty; ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); if (result != null && result.Entities != null && result.Entities.Count > 0) { tracingService.Trace("result is not null"); if (result.Entities[0].Attributes.Contains("new_goldencustomerid")) { string goldenCustomerV360ID = result.Entities[0].Attributes["new_goldencustomerid"].ToString(); tracingService.Trace(goldenCustomerV360ID); QueryExpression query = new QueryExpression { EntityName = "contact", ColumnSet = new ColumnSet(true) }; query.Criteria.AddCondition("pager", ConditionOperator.Equal, goldenCustomerV360ID); EntityCollection results = service.RetrieveMultiple(query); if (results != null && results.Entities != null && results.Entities.Count > 0) { contactID = (Guid)results.Entities[0].Attributes["contactid"]; tracingService.Trace(contactID.ToString()); } } } return contactID; } private static Entity RetrieveEntityById(IOrganizationService service, string strEntityLogicalName, Guid guidEntityId) { Entity RetrievedEntityById = service.Retrieve(strEntityLogicalName, guidEntityId, new ColumnSet(true)); return RetrievedEntityById; } } Requirement is to check on create of wineorder , if customer in its customer lookup is already a golden customer in goldencustomermapping, then don't update anything else update the lookup with a golden customer.. Please suggest where am i wrong? Getting a 2 min limit issue as well as traces as i shown in above reply. Thanks

Forum Post: RE: Field Service Technicians Tracking

$
0
0
Hi Thomas, what is Delay(Second) and Distance(Meter), how does it work? Thanks, Shahbaaz

Forum Post: RE: How to Read Microsoft CRM online reports data using Rest API

$
0
0
Short answer - there isn't a supported way to programatically generate reports in D365 online.

Forum Post: RE: Updating a lookup in a custom entity through plugin

$
0
0
It is going into an infinite loop, because you have created an infinite loop for the scenario when Customer is not a GoldenCustomer. See the code lines after while (result != null && result.Entities != null) When does this loop break? I don't understand why a loop is required there in the first place. Do a NULL check and then proceed. Remove the loop. If my answer helps you, please mark it as verified.

Forum Post: RE: Stop record creation from Pre-validate Plugin without throwing exception

$
0
0
You'd probably be better off moving your code to a plug-in which is registered on a custom action and then call the custom action using JavaScript when the form saves. This way you can get back an error message and display it in a friendly way to the end user.
Viewing all 154803 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>