dynamics-crm-2011

Dynamics CRM - Accessing Custom Product Option Value

人盡茶涼 提交于 2019-11-27 08:24:48
问题 Is there a way to programmatically access the Label & Value fields that has been created as a custom Field in MS CRM Dynamics please? I have added a custom field called "new_producttypesubcode" which, for example, has 2 options, Trophy = 1000000 and Kit = 10000001. I am writing an import utility that mirrors products between the customers website and their CRM and I want to get a list of all possible product options in the CRM to see if they are matched in the website. So, in essence I want

How to get current user privileges in MS Dynamics CRM on server side

五迷三道 提交于 2019-11-27 07:53:35
问题 I'm working on MS CRM plugin, and it should be able to determine whether the current user has write access to the current entity. I don't know how to approach this task. It seems that the most user-friendly way accomplish this task is currently unsupported. Is there any alternative in MS CRM 2011 SDK, except composing a FetchXML query and parsing its output? 回答1: Here is what I have come up with — this code will check, does current user has given privilege on current record: // Requesting

Error within Where statement in LINQ

痞子三分冷 提交于 2019-11-27 07:43:25
问题 For some reason in my where it says that "firstname" does not exist in the Opportunity Entity. But it is set for the SystemUser Entity. Any idea why it is getting confused? Thanks! var linqQuery = (from r in gServiceContext.CreateQuery("opportunity") join c in gServiceContext.CreateQuery("account") on ((EntityReference)r["accountid"]).Id equals c["accountid"] join u in gServiceContext.CreateQuery("systemuser") on ((EntityReference)r["ownerid"]).Id equals u["systemuserid"] where r["new

Can I update the owner id of a Contact using LINQ?

有些话、适合烂在心里 提交于 2019-11-27 06:11:02
问题 I'm using CRM 2011, and attempting to update the OwnerId of contact using this code: var crmContext = new CustomCrmContext(service); var contact = crmContext.Contact.FirstOrDefault(c=>c.Id == id); contact.OwnerId.Id= newOwnerId; crmContext.UpdateObject(contact); crmContext.SaveChanges(); I don't get any errors, however, the ownerId never updates in the database. I am able to update other attributes, but I'm just wondering if maybe the OwnerId is special and you have to use OrganizationRequest

CRM 2011 “$ is undefined”

白昼怎懂夜的黑 提交于 2019-11-27 04:45:32
问题 I have created following code, and I have included this as web resource on the CRM 2011 form to be called on field onchange event of lookup field. Everything is working fine before the $.ajax({... line and then I have an error “ $ is undefined”. I am not very familiar with scripting so please help. function GetAddress() { var accountId; var dataArray; var accountRequestUrl; if (crmForm.all.regardingobjectid.DataValue != null) { dataArray = crmForm.all.regardingobjectid.DataValue; accountId =

Call C# Code from Ribbon JScript CRM Online 2011

和自甴很熟 提交于 2019-11-26 23:04:09
问题 I need to have some code execute on the click of the ribbon button on an entity that updates some related data from CRM Online 2011. I would prefer not to have to write all of this logic in JScript. Is there a way to call into C# code from JScript? I have looked at the JScript file Microsoft is using from the ribbon and it looks like this: Mscrm.Campaign.copyCampaign = function (campaignId, saveAsTemplate) { var $v_0 = new RemoteCommand("MarketingAutomation", "CopyCampaign", null); $v_0

MS Dynamics CRM online 2011 - Authentication issues

試著忘記壹切 提交于 2019-11-26 19:07:33
I am a total newbie with dynamics crm online (2011), and although I have been working through the SDK sample code, I am trying to find the simplest way to perform a basic authenticated connection to our online Dynamics CRM service, and push some very basic data to a custom entity/extension I have created. Hopefully you can see from the above code snippet (sensitive data blurred), I am probably trying to circumvent the authentication process? The above code example was based a little on some of the code samples in the CRM SDK, and also from a code project example . I don't know if the code