Quantcast
Channel: Jason Lattimer's Groups Activities
Viewing all 869 articles
Browse latest View live

Talking to Dynamics CRM Online thru Web API

$
0
0

I'm trying to create a new contact (proof of concept) thru web api, but om getting 401 Unauthorized. I'll post my code below:

try
{
    var jsonStr = "{ \"firstname\": \"Test\", \"lastname\":\"API\" }";

    string username = "lars@foo.onmicrosoft.com";
    string password = "qwert1234";
    string domain = "foo.onmicrosoft.com";
    string baseAddress = "https://foo.crm4.dynamics.com";

    byte[] credentialBuffer = new UTF8Encoding().GetBytes(username + ":" + password);

    var request = (HttpWebRequest)WebRequest.Create(baseAddress + "/api/data/v9.1/contacts");
    request.Method = "POST";
request.ContentType = "application/json"; request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(credentialBuffer));  request.Headers.Add("OData-MaxVersion", "4.0"); request.Headers.Add("OData-Version", "4.0"); using (var stream = request.GetRequestStream()) { var jsonStrBytes = Encoding.ASCII.GetBytes(jsonStr); stream.Write(jsonStrBytes, 0, jsonStrBytes.Length); } var response = (HttpWebResponse)request.GetResponse(); var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); } catch (Exception ex) { }

But from this I get 401 Unauthorized. This is Dynamics CRM Online and my user is a 365 user. What am I missing here?


can i set CRM to log automatically at same time evry day

$
0
0

I want to know if we can set the application to log  in CRM at the same time everyday

D365 Developer Extensions

$
0
0

I am trying to install D365 Developer Extensions for CRM dynamics plug-in projects. As this is not published Microsoft, our IT security does not allow us to use this. Do you have any workaround/Microsoft authorized extensions that I can use. 

marketplace.visualstudio.com/items

Thanks,

Raj

Use Xrm.WebApi in a stand alone Web Resource

$
0
0
I ran into this issue working on the last update to CRM REST Builder when adding the Xrm.WebApi functionality. Note this won’t effect you if you’ve got a web resource embedded in a form.

Attempting to execute a simple retrieve for example:
Xrm.WebApi.online.retrieveRecord("account"…
And I was greeted with this error:

Unexpected token u in JSON at position 0

What does that even mean? I bit of searching and I ran across this Stack Overflow question. So it seems Xrm.WebApi is looking for a variable which maps entity names with their corresponding entityset names. Easy fix since I had all the data so I dynamically built a variable with all the mappings which looked a bit like this (you only need to add the entities you're working with):
window["ENTITY_SET_NAMES"] = ['{"account":"accounts", "contact":"contacts"}'];
Got further along and started working implementing actions and functions and ran into the same error once again, WTF. After some tedious debugging through the Microsoft code I found there is another dependency on a similar variable. This one maps entities to their primary id fields. So I added something like this with all these mappings:
window["ENTITY_PRIMARY_KEYS"] = ['{"account":"accountid", "contact":"contactid"}'];
After that my problems were solved.

Visual Studio 2017 - Dynamics 365 SDK cant connect to server

$
0
0

1. I downloaded the Developer extensions and the developer toolkit. (vsix for dynamics)

2. Updated the manifest with the version 15 instead of the 14.

3. Got both installations completed 

4. Instead of map the folders installed I mapped the path to the most recent version of dlls.

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/download-tools-nuget

And now I cant make the connection. When I tried to start a new project I get the window that asks if you want to reconnect to crm and it shows my server: organization: and user: do you want to use this connection I click yes and then I get this error:

Dynamics 365 Trial

$
0
0

Hi,

Hopefully someone can help - I have registered for a Dynamics 365 trial version - I was hoping to explore creating workflows etc - but I am not an administrator so can't do this.  When I try to update my user it fails.  Can anyone help.

thanks

Steven

Total time and Billable Time data capturing while resolving Case

$
0
0

I have added time sheet for Case entity.  I am capturing spent hours in Case entity from consolidated time sheet hours.  I would like to show this Spent hours during resolving case.   While resolving Case,  the dialog pop up is showing as below the screen shot.

During this time,  I would like to show default "Total time and Billable Time" as Spent hours.  How can I achieve this.

Why can't I select the accountnumber as alternate key of the account entity

$
0
0

Hi, hope someone can help me with this: 
I need to define the accountnumber of the account entity as alternate key so that there will be no duplicates.

This seems like a common scenario, as almost every sample on the net uses the accountnumber field.

But, I can't select that field, it's just not in the list when defining a new key.

Has anybody had the same experience and can advise me on this?

Kind regards,
Maurits


Can we connect to MSCRM through token instead of user name and password using Microsoft SDK

$
0
0

Hi,

I am able to connect MSCRM through C# .Net application with User Name , Password and Organisation URL,

ClientCredentials credentials = new ClientCredentials();
credentials.UserName.UserName =xyz;
credentials.UserName.Password = abcd213;
Uri serviceUri = new Uri('xyz.api.dynamics.com/.../Organization.svc');
OrganizationServiceProxy proxy = new OrganizationServiceProxy(serviceUri, null, credentials, null);
proxy.EnableProxyTypes();'
_service = (IOrganizationService)proxy;

 

Can I connect same with oauth2 token instead of User Name and password using Microsoft SDK?

Thanks in advance!

How do I add a default project based line item to an order?

$
0
0

Hello,

Could someone point me in the right direction, please? I'd like to add a default project based line item to any work-based order.  Where do I create the record using a workflow?  These don't bring up the form I get when I add something manually:  Project Contract Line Detail, Order.

Thanks!

How to Read Microsoft CRM online reports data using Rest API

service.Create Sometimes takes abruptly longer to execute

$
0
0

Hi All,

I have a plugin to create a case synchronously with certain attributes. On an average, the service.create call takes around ~2-3 Seconds to execute. But few times it takes 10-20 seconds to execute the same call with similar number of attributes.

Has anyone experienced this behavior before? Please suggest in case you've any thoughts on this problem.

Thanks,

Meet

Stop record creation from Pre-validate Plugin without throwing exception

$
0
0

Hello Techies, 

I have a pre-validate plugin for duplicate detection.

based on the criterion if there is duplicate records found, I want to stop the record creation without throwing the Invalid Plugin Execution Exception.

Thanks in Advance. 

Viswa

looking for a tool to run to have it check for depreciated client api

$
0
0

I am currently on CRM 2016 and I read that some APIs are being depreciated when upgrading to 365.  Is there a tool that I can run to have it check all of my scripts for those depreciated APIs instead of going through them individually?

Thank you.

How to integrate the validation before cancel the sales order

$
0
0

I would like to do some validation part before cancelling the Sales Order.  I have created a plug-In for adding validation and calling this plug-In when "Cancel Order" button clicked.  If the validation is not satisfied,  I am throwing an error message by throwing an exception.  It's working fine. But the "Cancel Order" dialog box is opening when clicking "Cancel Order".  Eventhough it's throwing error message,  if I closed error message,  the dialog box still open only.  They can able to "Cancel Order".  Before "Confirm" the cancel order, whether can I integrate order cancelling. 


Talking to Dynamics CRM Online thru Web API

$
0
0

I'm trying to create a new contact (proof of concept) thru web api, but om getting 401 Unauthorized. I'll post my code below:

try
{
    var jsonStr = "{ \"firstname\": \"Test\", \"lastname\":\"API\" }";

    string username = "lars@foo.onmicrosoft.com";
    string password = "qwert1234";
    string domain = "foo.onmicrosoft.com";
    string baseAddress = "https://foo.crm4.dynamics.com";

    byte[] credentialBuffer = new UTF8Encoding().GetBytes(username + ":" + password);

    var request = (HttpWebRequest)WebRequest.Create(baseAddress + "/api/data/v9.1/contacts");
    request.Method = "POST";
request.ContentType = "application/json"; request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(credentialBuffer));  request.Headers.Add("OData-MaxVersion", "4.0"); request.Headers.Add("OData-Version", "4.0"); using (var stream = request.GetRequestStream()) { var jsonStrBytes = Encoding.ASCII.GetBytes(jsonStr); stream.Write(jsonStrBytes, 0, jsonStrBytes.Length); } var response = (HttpWebResponse)request.GetResponse(); var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); } catch (Exception ex) { }

But from this I get 401 Unauthorized. This is Dynamics CRM Online and my user is a 365 user. What am I missing here?

D365 Developer Extensions

$
0
0

I am trying to install D365 Developer Extensions for CRM dynamics plug-in projects. As this is not published Microsoft, our IT security does not allow us to use this. Do you have any workaround/Microsoft authorized extensions that I can use. 

marketplace.visualstudio.com/items

Thanks,

Raj

can i set CRM to log automatically at same time evry day

$
0
0

I want to know if we can set the application to log  in CRM at the same time everyday

How to extend the timeout on preview when hovering over fields in IE11?

$
0
0

Is there any way to extend the period a field's contents (ie not Label/Description) are displayed on mouseover please? We use CRM 2013 on premises via IE 11. Currently the preview fades after around 5 seconds. I would like to extend this to 30 seconds or even better make it unlimited. I note it is unlimited via Chrome 61. Thanks.

Why can't I select the accountnumber as alternate key of the account entity

$
0
0

Hi, hope someone can help me with this: 
I need to define the accountnumber of the account entity as alternate key so that there will be no duplicates.

This seems like a common scenario, as almost every sample on the net uses the accountnumber field.

But, I can't select that field, it's just not in the list when defining a new key.

Has anybody had the same experience and can advise me on this?

Kind regards,
Maurits

Viewing all 869 articles
Browse latest View live


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