Quantcast
Channel: CRM Development forum
Viewing all 8223 articles
Browse latest View live

Fetch XML Report - How to use optional parameters?

$
0
0

Hi Guys

Can someone please explain to me how to use optional parameters in Reporting Services using Fetch XML?

I cannot seem to find a single example anywhere.

Thanks


Business process flow Customization - CRM 2016 online

$
0
0

Hi,

We have configured business process flow(BPF) for our CRM system. We are facing few issues with them. There are few stages on the BPF which need to appear based on some conditions. These have been mentioned in the configuration. The conditions work fine when we manually switch stages on the BPF. But, our requirement is that we need to change the Stage of the BPF to a future stage automatically through code. We tried a plugin in which we hard coded the GUID of the stage we want to switch to automatically. The problem is that even the conditional stages show up - even though the conditions are not satisfied.

It's just that we are not sure why the conditional stages show up - we are fine with the others showing up as complete on the BPF.

Hope this makes sense!

Regards,

Anwesha

Make CRM 2013 SubGrid as Readonly only on specific conditions through Plugin/Ribbon Customisations

$
0
0

Hi,

    I have a requirement to make a subgrid as readonly based on the status for specific set of users and specific to that record as well - CRM 2013

 (i) Status="Something" -  To make a subgrid as editable,Addnew,Add associated  in for all users specific to that parent record. 

 (ii)Status="Something" - 

        Users(A) - To make a subgrid as non editable,Should not add new, Should not add associated records only for that parent record . But the same user should be another create new main parent record and be able to add new Subgrid,Edit and Add associated Records. 

        Users(B)  - But still it should be editable,Addnew, Add Associated records .

  (iii) Status ="Something" - 

      For All Users - That Subgrid needs to be read only only for that parent record. If they create a new parent record, It should be allowed to add or edit Subgrid records      

 I tried to create an update plugin for associate and dissociate security roles on Status update. But that make all the other records as Read only or Editable as well. This is not working with Record Level, It works only on Entity Level.

 Any suggestions 

Thanks 


2016 SDK CrmSvcUtil Error

$
0
0

I am trying to generate a Early bound class file to use in a web project, but using the command line for v8.1.0.7711 of the CrmSvcUtil doesn't seem to work with the newest version of the 2016 SDK?  I can run the same command with the v7.1.1 version, and it works fine.

The Microsoft.Xrm.Client.CodeGeneration and .CodeCustomization files are there, but when you run the command line, it generates an error.

Error:

---------

CrmSvcUtil.exe /out:PortalXRM.cs /url:[URL] /username:[uname] /password:[pw] /namespace:PortalXRM /serviceContextName:XrmServiceContext /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,Microsoft.Xrm.Client.CodeGeneration"

CrmSvcUtil : CRM Service Utility [Version 8.1.0.7711]
c 2015 Microsoft Corporation. All rights reserved


Exiting program with exception: Could not load file or assembly 'CrmSvcUtil, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.IO.FileLoadException: Could not load file or assembly 'CrmSvcUtil, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'CrmSvcUtil, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
   at Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
   at Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
   at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
   at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source    : mscorlib
Method  : GetTypeByName
Date    : 11:46:56 AM
Time    : 6/14/2016
Error   : Could not load file or assembly 'CrmSvcUtil, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Stack Trace     : at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
   at Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
   at Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
   at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
   at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
======================================================================================================================


How can you specify the duration after which CRM Online signs out?

$
0
0
When CRM online authenticates against Azure AD, how can we specify a period of inactivity after which CRM signs out automatically and forces the user to re login?

Rahul Ranjit

Issue using deviceidmanager for an Azure WebJob command line

$
0
0

I have build a command line app which connects to CRM and outputs some data to an FTP location.  It is working well.

I thought I would deploy it to Azure as a WebJob so that it could be scheduled.

I received errors from the deviceidmanager relating to the file location of the deviceid details.  I found an article and made the changes below which seemed to fix the issue.

private static class LiveIdConstants
        {
            public const string RegistrationEndpointUriFormat = @"https://{0}/ppsecure/DeviceAddCredential.srf";

            public static readonly string FileNameFormat = Path.Combine(
                Environment.GetEnvironmentVariable("WEBROOT_PATH"),"{0}{1}.xml");

            public const string ValidDeviceNameCharacters = "0123456789abcdefghijklmnopqrstuvqxyz";

            //Consists of the list of characters specified in the documentation
            public const string ValidDevicePasswordCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^*()-_=+;,./?`~";
        }


private string Encrypt(string value)
        {
            if (string.IsNullOrEmpty(value))
            {
                return value;
            }

            byte[] encryptedBytes = ProtectedData.Protect(Encoding.UTF8.GetBytes(value), null, DataProtectionScope.LocalMachine);
            return Convert.ToBase64String(encryptedBytes);
        }

        private string Decrypt(string value)
        {
            if (string.IsNullOrEmpty(value))
            {
                return value;
            }

            byte[] decryptedBytes = ProtectedData.Unprotect(Convert.FromBase64String(value), null, DataProtectionScope.LocalMachine);
            if (null == decryptedBytes || 0 == decryptedBytes.Length)
            {
                return null;
            }

            return Encoding.UTF8.GetString(decryptedBytes, 0, decryptedBytes.Length);
        }

Note the use of LocalMachine the WebRoot Path.

Things were fine for 24 hours and then I started getting the following error:

System.InvalidOperationException: Unable to Deserialize XML (Operation = Loading Device Credentials from Disk):

System.InvalidOperationException: There is an error in XML document (5, 5). ---> System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)

[09/02/2016 14:38:00 > 86fffa: INFO]    at Microsoft.Crm.Services.Utility.DeviceUserName.Decrypt(String value) in C:\Projects-Online\***\LetterBatchTool\Helpers\deviceidmanager.cs:line 981

I am unsure why the code worked and then broke without intervention.  It had been running every hour for testing purposes. 

Could the file have become corrupt?  Do I need the file? Is there maybe a way to bypass it or store the data another way?  Perhaps a simple amendment to make it use hardcoded values or create the data fresh every time?


Incident form is Blank

$
0
0

Hi Team,

When i open the Incident record from the grid, the incident form is blank and even ribbon also not showing.

But the logged in user's security role  is having Organization level access for incident.

I am not getting what might be the issue. Kindly help me in this regards.

Thanks,

Sreenath

Unable to get Active Contact Records Count from Marketing List

$
0
0

Hello Experts,

My requirement is to get only Active Contact records count when a Contact is associated with Marketing List and show it in a Integer field. 

I am using below Odata Query, but i am not getting any result. Is anything wrong with the below or is there any better approach to achieve this? 

http://<Server URL>/<Org Name>/xrmservices/2011/OrganizationData.svc/ListSet?$select=listcontact_association/StateCode&$expand=listcontact_association&$filter=ListId eq guid'<Guid>' & listcontact_association/any(a:a/StateCode/Value eq '0')

Please help.


Arun Potti



While Opening Incident form getting Uncaught TypeError: Cannot read property 'Client Variables' of undefined

$
0
0

Hi Team,

When try to open the Incident record form is showing blank and  i am getting following java script error in the console.

Uncaught TypeError: Cannot read property 'Client Variables' of undefined.

Please help me in this regards.

Thanks,

Sreenath

CRM 2016:Using Web API for CRM IFD to connect CRM Web Service

$
0
0

Hello,

I'm new to Web API and trying to build a CRM Web Service application with C# by using Web API. Here is the sample code I'm using: C# application which authenticates against Azure AD using ADAL and communicates with Dynamics CRM

This code works perfectly for AD authentication on premise CRM environment. But my environment is IFD, which means I have to use OAuth. it says method calls to the web services must be authorized with the identity provider for that service endpoint. However all the example point to Microsoft Azure Active Directory. but for real case, do we have to register a CRM app with Azure Active Directory?

Then how can I define the 'Client ID', 'RedirectUrl', 'Authority' in my code, where is my endppoint? We're using ADFS authentication.

Can anyone share some sample codes for this?

Thanks.


Dashboards, charts and updating

$
0
0

crm2016

you will have to forgive my stupidity as I'm still trying to learn this stuff

We have records added to an entity every few minutes, with the record having 1 of 5 different internal id numbers. I would like to add a chart to a dashboard that shows the number of files for each id, (that bit is easy enough to do), that auto updates just that chart and not the entire dashboard on a set timer.

I have tried this before and failed. I was told to use a web frame .. but I just don't know how to go about it. Where would I get the url for the chart itself?

can anybody please take the time to give some idiot instructions on how to accomplish this


Dont ask me .. i dont know

MS CRM 2016 - Interactive Service Hub - facing "There is at least one error that must be fixed before you can proceed"

$
0
0

Hi Team,

In MS CRM 2016 Interactive Service Hub, Knowledge Article entity i customized to server my purpose. I added few new fields.

And published. But when i come to Interactive Service Hub, it is giving below error. 

There is at least one error that must be fixed before you can proceed.

Please help me in this regards.

Thanks,

Sreenath

USD for multiple organization

$
0
0

Hi All,

Can we use USD for multiple organization in one USD client?

thanks

MS Dynamic CRM 2015 (On-Premises) => Unable to view custom report

$
0
0

Hi,

I have successfully installed MS Dynamics CRM Reporting Extensions in the database server. I am able to navigate to the ReportServer Url.

I have created a custom report using the Report Wizard in MS Dynamic CRM 2015. However, I am unable to view the report when I click 'Run Report'. Following error occurs:

An error has occurred during report processing. (rsProcessingAborted)

Log Details:

Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
   --- End of inner exception stack trace ---
   at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
   at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
   at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
   at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
   at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
   at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)


 I am able to view the pre-existing reports like 'Account Distribution', 'Account overview' etc when I click 'Run Report'

 Kindly provide resolution to the above issue.

 Thanks in advance.    

Update CRM online 2016 records from custom application using WEB API

$
0
0
I am using below code to update the crm records from custom html application(using CRM 2016 online web API). We have already registered our custom application using Azure Ad in O365 and the we are able to retrieve the records from CRM successfully in the custom application(Html).

Now  we are trying to update the MS CRM online 2016 records from custom application, application runs successfully without any error but the records are not updated in MS CRM. So while debugging my code i have received some error 


PATCH https://crmurl.crm.dynamics.com/api/data/v8.0/accounts(b2c9cceb-236c-e611-80db-c4346bb59860) (anonymous function) 
XMLHttpRequest cannot load https://crmurl.crm.dynamics.com/api/data/v8.0/accounts(b2c9cceb-236c-e611-80db-c4346bb59860). No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:65343' is therefore not allowed access. The response had HTTP status code 401.

here  http://localhost:65343 is my custom application url(same url registered in Azure Ad and i am able to retrieve records from CRM)

Update JS Code:

             var account = {};
               account["name"] = "Test"; 
               account["address1_city"] = "Test City"

              var req= new XMLHttpRequest();
               req.open("PATCH", "https://crmrocks.crm.dynamics.com/api/data/v8.0/accounts(" + id + ")", true);
               req.setRequestHeader("Accept", "application/json");
               req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
               req.setRequestHeader("OData-MaxVersion", "4.0");
               req.setRequestHeader("OData-Version", "4.0");
               req.setRequestHeader("Access-Control-Allow-Origin", "http://localhost:65343/Accounts.html");
//           req.setRequestHeader("Access-Control-Allow-Methods", "GET,POST,PUT,DELETE,OPTIONS");
//           req.setRequestHeader("Access-Control-Allow-Headers", "Content-Type");
               req.send(JSON.stringify(account));
               if (req.readyState == 4 /* complete */) {
                   if (req.status == 204) {
                       alert("Completed");
                   } else {
                       alert("Not Completed");
                   }
               }

Kindly help me to resolve this error.

MS Dynamic CRM 2015 (On-Premises) => How to add the 'REPORTS' tab to the main menu

$
0
0
Hi,

I am using MS Dynamic CRM 2015 (On-Premises) & I would like to add the 'REPORTS' tab to the main menu as shown below:

SALES, SERVICE, MARKETING, SETTINGS, HELP, REPORTS

Please let me know the changes that I have to make to customizations.xml file so that the 'REPORTS' tab is shown in the main menu

Currently REPORTS tab is seen in MS Dynamic CRM -> Service -> Reports & MS Dynamic CRM -> Marketing -> Reports

Thanks in advance.

Disable the Save and New buttons in CRM2013

$
0
0
Does anyone know how I can disable the two buttons- Save/New based on a field value? I've looked at a few ways but they seem to be un-supported methods.

The list has not finish opening, try your request again error when searching records MS crm 2011

$
0
0

Hi ,

On one of the Client Machine , the user is facing 

 the list has not finish opening, try your request again

 this issue when they try to search on any entity 

We have CRM 2011 and UR 15 on server , the user is using IE7 browser , this issue happens only to one user 

ANy thoughts why this error happens 

Thanks in Advance 

Regards,

Kumar


401

How to activate/generate the Encryption key for on premise upgraded orgs in CRM 2013 and what are the know impacts in the server?

$
0
0

Hi,

I have the on premise orgs (using https://) upgraded from 2011 to 2013. I don't have "Data Encryption" activated yet but I would like to activate it at some point. But what I can't find references is how to activate the "Data encryption". Do the following steps works to activate it?

Go to Settings > Data Management > Data Encryption. Once you click the Data Encryption link, a dialog opens that gives you the ability to activate the data encryption key. Click “Activate” to activate the Data Encryption

I would also like to be aware of know issues/impacts of activating it. What are the known issues or impacts?

  1. Can we have a encrypted field in the org once we activate the “Data Encryption” like for SSN field?
  2. How does it impact on the server performance?

Thanks!

Get ReceivablesInvoice By Key

$
0
0

Hi

I am using Microsoft dynamics GP web services. I am trying the find a function that would find the Receivables Invoice by Invoicekey and return back the information about the invoice( like InvoiceID, Invoice Amount ).

Viewing all 8223 articles
Browse latest View live


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