dynamics-crm

how to hide a pre-filter window in CRM 2011?

这一生的挚爱 提交于 2019-12-11 02:13:25
问题 I'm looking for a way how to hide a pre-filter in CRM 2011. I created a sipmle report by using business intelligent studio. Eventially, the reports shows a table with data (SQL query like select column1, column2....from table) when I open it in CRM I get a window where I have to built filter. Is there any way avoid such window? I found that I cand set a query in filter by default but anyway It doesn't help except this screen thanks in advance 回答1: To remove the pre-filter page, you have to

Dynamics CRM SDK - IN operator for linq with OrganizationServiceContext

送分小仙女□ 提交于 2019-12-11 01:59:05
问题 I'm using my OrganizationServiceContext implementation generated by the svcutil to retrieve entities from CRM: context.new_productSet.First(p => p.new_name == "Product 1"); Is it possible to retrieve multiple entities with different attribute values at once - (smth like IN operator in SQL)? Example: I would like to retrieve multiple products ("Product 1", "Product 2", ...) with a single call. The list of product names is dynamic, stored in an array called productNames. 回答1: No, you can't. CRM

Xrm.Page.data is null

筅森魡賤 提交于 2019-12-11 01:57:34
问题 I have added a custom form on the opportunity entity and have some javascript attached to it. I'm calling the form using window.open and the formId in the url to open the form and is only used to create opportunity entities. Inside the javascript I'm simply trying to populate some fields but the Xrm.Page.data object is always null. $(document).ready(function () { Xrm.Page.getAttribute("ct_testfield").setValue('test');}); Thanks! Jon UPDATE: Apparently $(document).ready() fires before the Xrm

Dynamics CRM 2011 - Filtering LINQ query with outer joins

痞子三分冷 提交于 2019-12-11 01:35:11
问题 I have a requirement to query for records in CRM that don't have a related entity of a certain type. Normally, I would do this with an Left Outer Join, then filter for all the rows that have NULLs in the right-hand side. For example: var query = from c in orgContext.CreateQuery<Contact>() join aj in orgContext.CreateQuery<Account>() on c.ContactId equals aj.PrimaryContactId.Id into wonk from a in wonk.DefaultIfEmpty() where a.Name == null select new Contact { FirstName = c.FirstName, LastName

CRM 2011: Reauthentication with _serviceProxy.Authenticate()

前提是你 提交于 2019-12-11 01:35:06
问题 I have developed a client software for ms dynamics 2011 using WCF channel and organization service. After creating the channel I put it into dictionary Dictionary<string, OrganizationServiceProxy> and after 8 hours waiting was over, the security token was not valid any more. Now I call serviceProxy.Authenticate() method (serviceProxy is an object retrieved from my collection) and nothing happens. My token has not been renewed and I can not use my channel to retrieve data from dynamics. As I

CRM 2011: Wsdl web service doesn't contain my entities

别来无恙 提交于 2019-12-11 00:49:10
问题 We will soon upgrade to CRM 2011 so I'm doing some tests. The problem is that when I change my web service reference to the 2011 one, my application stops compiling. It just won't find any entity (example of line that stops working: Account acc = new Account() -> It says that I must miss a reference). When I compare the web services of the CRM 4 to the one of the CRM 2011, I see that it's true. The CrmService of CRM 4 contains the definition of every entity of the CRM, but they do not appear

Linq to Dynamics - compare two properties in where clause

瘦欲@ 提交于 2019-12-11 00:27:17
问题 I am using Dynamics sdk dll's ver 5.0.9689.2165 and trying to use Linq to get all Accounts where the Account.XDate is less than the Account.YDate (both are custom DateTime properties - I use the genenerated proxy classes in project to access these) from a Dynamics Online account. I have this basic expression: var accounts = myOrganizationServiceContext.CreateQuery<Account>().Where(a => a.XDate < a.YDate) But I get the exception below when it gets processed - can't you compare 2 Entity

How to save a record and immediately use its GUID

耗尽温柔 提交于 2019-12-10 22:49:07
问题 I'm executing some javascript from a ribbon button and what I want to do is save the record that I am creating and then immediately use its GUID for some code a bit further on. Each time I try it the GUID is coming back null even though I'm requesting it after the record has been saved. If I try the button again after I've saved it then it works, but not as I'm saving it. Is there a way to do this? function RibbonButton_AddProduct() { //Save the Record Xrm.Page.data.entity.save();

Retrieving a single Guid in CRM 4.0

╄→гoц情女王★ 提交于 2019-12-10 19:47:27
问题 I'm new to CRM (version 4.0) and i'm trying to return a 'yearid' guide based on a given year (which is also stored in the entity).So far i've got: public static Guid GetYearID(string yearName) { ICrmService service = CrmServiceFactory.GetCrmService(); // Create the query object. QueryExpression query = new QueryExpression("year"); ColumnSet columns = new ColumnSet(); columns.AddColumn("yearid"); query.ColumnSet = columns; FilterExpression filter = new FilterExpression(); filter.FilterOperator

Dynamics CRM 365 - Cannot access Xrm.Page.entity in HTML web ressource

好久不见. 提交于 2019-12-10 19:22:05
问题 I've added an html resource in my contact form which contains only an small image in order to place it just beside a contact field. When the user clicks on it, it fires up a javascript function in which I want to get the value of a specific field of the form. The field is an attribute of the contact entity. Here is the HTML web ressource: <html> <head> <style type="text/css"> body { margin: 0; padding: 0; } </style> <script type="text/javascript"> function call() { var phoneNumber = window