Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all 79901 articles
Browse latest View live

Use of Web API in form scripts

$
0
0

Hi,

I am trying to refactor my script in order to use web api. We are about to upgrade to CRM 2016. This particular script has worked fine until now.

But in CRM 2016, it is failing to work and upon some research I found it might be due to use of old odata endpoints in the script. So I tried to use the new web api url in the script but it still fails.

I did debug the script and found my userRequest.status gives me 0 for some reason. I've also used plural name of the entity in query.

Can some one please guide me in the right direction? Thanks for any help.

All this script does is, takes user id and retrieves an attribute(country) from the systemuser entity filtered on the user id.

function getUserCountry(userId) {
debugger;
var createdOn=Xrm.Page.getAttribute("createdon").getValue();
                if(createdOn!=null)
                {
           return;
                }

	    var serverUrl = Xrm.Page.context.getClientUrl();
	    //var ODataPath = serverUrl + "/XRMServices/2011/OrganizationData.svc";
            var ODataPath = serverUrl + "/api/data/v8.0";
	    var userRequest = new XMLHttpRequest();
	    userRequest.open("GET", ODataPath + "/SystemUsersSet(guid'" + userId + "')?$select=new_country", true);
		userRequest.setRequestHeader("OData-MaxVersion", "4.0");
		userRequest.setRequestHeader("OData-Version", "4.0");
	    userRequest.setRequestHeader("Accept", "application/json");
	    userRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8");
	    userRequest.send();
	    if (userRequest.status === 200) {
	    var retrievedUser = JSON.parse(userRequest.responseText).d;
            var country = retrievedUser.new_country; // new_country is the lookup field name inside user entity
return country;
}
	    else {
	        return "error";
	    }
	}


		var owner = Xrm.Page.getAttribute("ownerid").getValue();
		if(owner!=null) {
		var ownerId = owner[0].id;
		var country = getUserCountry(ownerId);

if(country!=null)
		{
		var countryValue = new Array();
		countryValue[0] = new Object();
		countryValue[0].id = country.Id;
		countryValue[0].name = country.Name;
		countryValue[0].entityType = country.LogicalName;

		Xrm.Page.getAttribute("new_country").setValue(countryValue);
}



How to migrate Users with their security role

$
0
0

We are performing migration from on premise to dynamics 365 online using kingsway soft.

We have migrated users but they don't have security role and we want a same role which they had earlier in the on premise version.

Need suggestion for how can we migrate users with their security roles.

Sales Manager viewing users calendars

$
0
0

Can anyone tell me how they are successfully monitoring their sales teams calendars within Dynamics?? The users can see their calendar but the sales managers can't see it. 

IS there any easy way to make this happen?? 

Thanks! 

Calculated Field on Product Entity - cannot use Name Field

$
0
0

I am trying to create a calculated composite search field on the Product Entity in Dynamics CRM 2016.  

So I have added the Product entity to a test solution and then created a new field "Search" which is a calculated field.  I use CONCAT and specify the fields I want to include.  The Name field from the Product Entity does not show in the list to choose from.  Interestingly if I try to specify a condition then I can select the Name field in the condition, just not in the action.

I can find no documentation on this as a limitation, and I can find no obvious occurrences of this issue in other entities (I thought it might have something to do with it being the primary field).  So I'm stumped.  Is this weirdness in our environment or is this a general issue or limitation.


Thanks!

Email Template Type

$
0
0

Hi, can we remove the existing email template type in the dropdown list?

Image of Entities

$
0
0

I know there is a way to make sure no one can add an image to an account/contact and such. BUt is there a way to find out how many accounts or contacts have the image already installed. 

Or is a way to limit the file size. Out of the box is 5MB

Thanks

is it possible to filter and group entity list in portal?

$
0
0

Hello,

I have following requiremnts.

1. Applying where condition to entity list like WHERE userid = <currently logged in user id>

2. Grouping entity list by Decimal field.

Is it possible to do so?

Regards,

Ashish

Is there any hierarchical grid control supported by portal to show records in tree like structure?


Emails do not remain tracked / changing set regarding in Outlook does not automatically update in CRM

$
0
0

Hello all,

Details:

- Microsoft Dynamics 365 Version 1612(8.2.1.411) (DB 8.2.1.411) online

- Using the CRM app for Outlook

- Server side synchronization is set up and the mailbox is tested and approved. 

I have two issues that I cannot seem to find an answer for:

1) When tracking emails in Outlook, it sometimes happens that suddenly the tracking is no longer present on the email. Nobody changed anything about the email or the activity in CRM. I just click the mail, open the Dynamics 365 pane and find that nothing is being tracked for the email even though I tracked it just before. This does not happen for all emails. Others remain tracked without a problem (for now).

Has anyone encountered a similar problem and found a solution?

2) When tracking email using "Set regarding", this is tracked in CRM as well with the correct "set regarding" value. However, when I update the "set regarding" in outlook to another value afterwards, this is not reflected in CRM. The previous "set regarding" remains there. I would expect that the new "Set regarding" is updated automatically when synchronizing between Outlook and CRM? 

Thank you in advance!

Kind regards,

Matthias

Assign Contact to Account based on Mail Domain Name

$
0
0

Hi Guys, 

I added a custom field to my account entity that contains different mail domain names that are owned by the account holder.

then i wrote a plugin so when a new contact is created it looks up if a domain name matches email adress and auto assigns it to the account.

however it does not work. 

i am very new to plugin dev. and don't quite understand how to apply my "_contact" variable to the CRM... i know my query works and all but i must be missing a details. can anybody help me with this?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Sdk.Discovery;
using Microsoft.Crm.Sdk.Messages;
using System.ServiceModel;

namespace Assigncontacttoaccount
{

        public class AssignAccount : IPlugin
        {

            public void Execute(IServiceProvider serviceProvider)
            {

                // Obtain the execution context from the service provider. (same as other plugin-written diff)
                Microsoft.Xrm.Sdk.IPluginExecutionContext context = (Microsoft.Xrm.Sdk.IPluginExecutionContext)serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext));
                IOrganizationServiceFactory wod_serviceFactory = null; // why is this null and in the other plugin it pulls stuff...
                IOrganizationService wod_CrmService = null;
                wod_serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
                wod_CrmService = wod_serviceFactory.CreateOrganizationService(context.UserId);

                if ((context.MessageName == "Create") && (context.PrimaryEntityName == "contact") && (context.InputParameters.Contains("Target")) && (context.InputParameters["Target"] is Entity))
                {
                    Entity _contact = (Entity)context.InputParameters["Target"];
                    //Make sure there is an email address on the contact and it's not already being tied to an Account
                    if ((_contact.Contains("emailaddress1")) && (!_contact.Contains("parentcustomerid")))
                    {
                        string _email = (string)_contact["emailaddress1"];
                        string[] _domain = _email.Split('@');
                        if (_domain.Length == 2)
                        {
                            QueryExpression _query = new QueryExpression();
                            _query.NoLock = true;
                            _query.EntityName = "account";
                            _query.ColumnSet = new ColumnSet();
                            _query.ColumnSet.Columns.Add("name");
                            _query.Distinct = true;
                            _query.Criteria = new FilterExpression();
                            _query.Criteria.FilterOperator = LogicalOperator.And;
                            _query.Criteria.AddCondition("new_linkeddomain", ConditionOperator.Like, "%"+ _domain[1].ToString()+ "%");
                            EntityCollection _accounts = (EntityCollection)wod_CrmService.RetrieveMultiple(_query);
                            if ((_accounts != null) && (_accounts.Entities.Count > 0))
                            {
                                _contact.Attributes.Add("Jobtitle", _accounts.Entities[0].Attributes["name"].ToString());
                                _contact.Attributes.Add("parentcustomerid", new EntityReference(_accounts.Entities[0].LogicalName, _accounts.Entities[0].Id));
                                context.InputParameters["Target"] = _contact;
                            }
                        }
                    }
                }
            }
        }
    }


Sent Email not showing in Outlook 365 Online

$
0
0

We have our email configured to use server-side synchronization for everything, so I was expecting that when I send an email from Dynamics that it would appear in my Sent email from my Outlook 365 application, but it's not.  Is this because of a configuration, or should I ever expect to see this?

Incoming emails coming against an existing case.

$
0
0

Hello experts,

We have the following scenario that we want to achieve through CRM 2016:

1. An incoming email automatically gets converted to a case through 'Automatic Record Creation and Update Rules' in the service management.

2. The case is automatically assigned to a team upon case creation.

3. I have also enabled 'Smart Matching' so that all replies on that incoming email gets linked to the same case.

No the issue is that first email from the customer gets converted to the case and the agent replies to that email. After that the customer responds again to the same email. How would the agent know that a new email has come against the same case? Is there a way to update the case status if an email comes against the same case?

Best Regards,

Hammad

pulling data from one entity to another

$
0
0

My question is this: if I have entities (tables) A, B, C, and D, and A is the parent of B and C. and C is the parent of D. With 1:N relationship between parent and child. Can I make a lookup field in D's form that is populated with the relevant Data from B?

Solutions menu is not visible

$
0
0

Hi have setup CRM 365 online, i am not able to see solutions under Customization. I am new to CRM, any help will help.

Thank you

Jayakumar

Organization Insights Dashboard.... Error?

$
0
0

Hello! I'm having an issue with the wonderful Organization Insights Dashboard. I have been recording and tracking data, as we've had some speed and loading issues. On Monday, my Total Page Requests stopped working on the "Forms" line. I can still see small spikes in dashboard usage, but the forms has gone from topping out in the hundreds during peak hours to flatlining since Friday evening. Anyone else notice this? Or is there a setting that needs to be changed? Just thought I'd throw this out there. It's frustrating to see it go flat!


Migrating data from CRM 2013 to Dynamics crm 365

$
0
0

Hello,

I installed visual studio 2017, ssdt package and Kingswaysoft SSIS package for migrating data from crm 2013 to dynamics crm 365.

Both thge connections were successful in connection managers. It gives the following error at runtime:

[Dynamics CRM Destination [20]] Error: The runtime connection manager with the ID "{41E12602-BE15-4B6A-B211-D43AC5BE8F6A}" cannot be found. Verify that the connection manager collection has a connection manager with that ID.

Can someone please help. Its really urgent.

Thank you.

Don't include the Hyperlinks in Excel when I run the report

$
0
0

Hi,

I have the requirement not to include the hyperlinks in excel after running the Report and exporting it to excel. Whenever I click on the cell with hyperlink on excel it is taking me to the record in CRM. I can manually remove all the hyperlinks after exporting to excel. I don't want to include hyperlinks in excel as I run the report.

Thanks,

Sai

Unable to send emails from CRM !

$
0
0

Hi All,

When we try approving email and click on test&enable mailbox , we see below error alert.

My primary email id on the user and the login email id for CRM are different.

Pre populating connections corresponding role and current record id for portal

$
0
0

Good afternoon, 

We have decided to use connections in CRM to control access for portal users..... so no connection no access to the accounts or contact records. the admin of the portal users want to be able to manage portal users connections/access through the portal.... So i have surfaced the connections forms on both the accounts and contacts form. 

It doesn't refill the connected from with current record and also doesn't pre-fill the corresponding role (it expects a corresponding role) after i select the connected to role. Has anybody surfaced connections through the portal and what did they need to implement to make it intuitive, its not intuitive in CRM and its whole lot uglier in the portal. 

Client been sold on the connections side of things but they haven't seen it in action on the portal. 

Thanks 

Una 

Ms Dynamics crm mobile app multiple records selection

$
0
0

Hi , is there a possible way to select multiple records in Dynamics CRM for Mobile? If not can we customize the app by using SDK ?

Viewing all 79901 articles
Browse latest View live


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