dynamics-crm

accessing the logged in CRM user from custom page

岁酱吖の 提交于 2020-01-16 08:40:09
问题 We have Dynamics CRM and a webform which is loaded from the ribbon, essentially inside an iframe. How do we get the logged on user? On the top right, is my name and image as logged in via Active Directory. However, if I do something like: var UserID = window.parent.Xrm.Page.context.getUserId(); or in C#: UserPrincipal user = UserPrincipal.Current; lblUser.Text = user.SamAccountName; then we get the generic user that CRM is configured to use. If I do a right click on the entire form and go

How do I select Dynamics CRM reference attributes?

强颜欢笑 提交于 2020-01-15 12:34:29
问题 Please read the follows and tell me what I did wrong. The request I sent: https://gravityrush.crm5.dynamics.com/api/data/v9.1/accounts?$expand=ownerid/$ref The response I expected: "ownerid":{ "@odata.type":"#Microsoft.Dynamics.CRM.systemuser", "@odata.id":"https://gravityrush.crm5.dynamics.com/api/data/v9.0/systemusers(41041b99-e1ae-46c6-a10c-95ce77fc0b18)" } The response I received: "ownerid":{ "@odata.type":"#Microsoft.Dynamics.CRM.systemuser", "@odata.id":"https://gravityrush.crm5

How can I have a Time field in Dynamics CRM 4.0?

此生再无相见时 提交于 2020-01-15 10:18:07
问题 I know nothing about CRM but have been asked to add some fields to a form. One of these is for a time but with no date element. How can I do this? 回答1: CRM does not provide this functionality out of the box. You'll need to customize it. I'd add a new DateTime attribute and a new Text attribute. capture the data you need in the DateTime attribute so you can report off of it. Then using Javascript, display only the time portion from the DateTime attribute in the Text field. -Mikeyb 回答2: I would

On PREM Dynamics CRM 2016 JavaScript equivalent of my C# QueryExpression

好久不见. 提交于 2020-01-15 08:14:31
问题 I am trying to get the FetchXML query for a specific query expression fro Dynamics CRM. I have manged to do it using the XRM SDK in a C# project as follows. string connectionStr = @"Server=https://mycompany.com/XRMServices/2011/Organization.svc; Username=theUserName; Password=pwd"; Microsoft.Xrm.Client.CrmConnection conn = Microsoft.Xrm.Client.CrmConnection.Parse(connectionStr); var service = new Microsoft.Xrm.Client.CrmOrganizationServiceContext(conn); var query = new QueryExpression();

Retrieving Entity Metadata using web api

我只是一个虾纸丫 提交于 2020-01-14 03:56:05
问题 we have a requirement where we have to retrieve an Entity's Metadata. Exact requirement: Im reading a field value on a form which ia having "entity schema name". With that I need to get that Entity's primary key schema name. Is it possible? If so please help me. Eg: in that field if I enter "lead" , that web api should fetch me "leadid" and store it in another field. 2. If I enter "incident" , that web api should get me "incidentid" 回答1: You don't need do retrieve entity metadata for that,

Can I create CRM workflows using .NET 4?

做~自己de王妃 提交于 2020-01-14 02:32:34
问题 I would like to take advantage of .NET4 for Dynamics CRM4.0. It is great for most things but I get a file not found exception when trying to register a workflow. It can't find System.Workflow.ComponentModel 4.0.0.0. Is there a workaround? 回答1: CRM 4 is built under .NET 2.0/3.0. So, the only way to work with .NET 4.0 and CRM 4.0 is to isolate them in their own process. CRM 5.0 will use .NET 4.0, so you will be able to use it with the next version of CRM. With some tweeks you should be able to

How to apply custom FetchXML to a Subgrid using JavaScript

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-13 20:48:48
问题 The implementation of applying custom FetchXML to a Subgrid appears to have changed from CRM 2011/13 to Dynamics 365. The change is with respect to GridControl.SetParameter() . I have followed many articles talking about this same issue but nothing is working at the moment on Dynamics 365 Online. Is there any alternative method to achieve the same functionality? In my below code, I am trying to fetch all of the phone call and email activities related to the account and show them on the

Dynamics CRM. Fully custom FetchXml in subgrid

房东的猫 提交于 2020-01-11 14:01:31
问题 I'm making a subgrid on account to show all related contacts by multiple fields. Here's fetch xml I'm trying to set: <fetch mapping="logical"> <entity name="contact"> <attribute name="firstname" /> <filter type="or"> <condition attribute="new_behorde" operator="eq" value="" /> <condition attribute="new_behorde2" operator="eq" value="" /> <condition attribute="new_behorde3" operator="eq" value="" /> </filter> </entity> I'm setting this using document.getElementById("contacts").control

Is that possible to make cast field in fetchxml?

放肆的年华 提交于 2020-01-11 10:08:32
问题 Is that possible to make cast field from identifier to string in fetchxml? I have this query: select * from table1 t1 left outer join table2 t2 on t1.stringId=CAST( t2.id as varchar(40)) where t2.id is null and t1.childid is not null and this row t1.stringId=CAST( t2.id as varchar(40)) can't make in fetchxml while field "stringId" is string but it's value is GUID and I want to have that equality. In fetchxml: <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"

How do you enable logging for CrmServiceClient in the Xrm Tooling toolkit?

六月ゝ 毕业季﹏ 提交于 2020-01-11 06:07:53
问题 I'm having issues trying to log in to a CRM Online organization through the use of the latest version of the Xrm Tooling nuget package using the connection string constructor from a custom powershell cmdlet. I'm receiving a rather unhelpful "Unable to Login to Dynamics CRM" error message and am attempting to enable tracing to troubleshoot but have not been able to enable it by modifying the .dll.config file like the below (taken from an XrmToolbox issue on GitHub): <?xml version="1.0"