473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Retrieving lead record from CRM 3.0

Very new to this but using the MS working with dynamics CRM 3.0 book to run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name 'CrmSdk' does not
exist in the class or namespace 'WorkingWithCrm' (are you missing an assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be passed in to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname", "lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(), leadId, cols);

// Display the results.
// Since we have strongly typed the responce, we can just access the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.

Oct 19 '06 #1
7 4671
I don't have the book so I have no idea what steps it details before the
code you posted but I would guess that you forgot to add a reference to the
CRM web service (or you named it something else than CrmSdk). Also verify
that the address to your crm server is indeed http://crm as the service.Url
line indicates

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:A8**********************************@microsof t.com...
Very new to this but using the MS working with dynamics CRM 3.0 book to
run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name 'CrmSdk' does
not
exist in the class or namespace 'WorkingWithCrm' (are you missing an
assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be passed in to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname", "lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(), leadId,
cols);

// Display the results.
// Since we have strongly typed the responce, we can just access the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.

Oct 20 '06 #2
Claes,

Cheers for that we found that some how CrmSdk had been changed to all lower
case within visual 2003. All seems to run without errors however the page
produced by internet explorer has no data in it.

Any further ideas.

Roy

"Claes Bergefall" wrote:
I don't have the book so I have no idea what steps it details before the
code you posted but I would guess that you forgot to add a reference to the
CRM web service (or you named it something else than CrmSdk). Also verify
that the address to your crm server is indeed http://crm as the service.Url
line indicates

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:A8**********************************@microsof t.com...
Very new to this but using the MS working with dynamics CRM 3.0 book to
run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name 'CrmSdk' does
not
exist in the class or namespace 'WorkingWithCrm' (are you missing an
assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be passed in to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname", "lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(), leadId,
cols);

// Display the results.
// Since we have strongly typed the responce, we can just access the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.


Oct 20 '06 #3
The code looks correct to me. Are you sure that the GUID is correct (does
http://crm/sfa/leads/edit.aspx?id={2EFAB039-2543-428E-95B8-10EA13D58198}
work)? Do you get any exception?

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:14**********************************@microsof t.com...
Claes,

Cheers for that we found that some how CrmSdk had been changed to all
lower
case within visual 2003. All seems to run without errors however the page
produced by internet explorer has no data in it.

Any further ideas.

Roy

"Claes Bergefall" wrote:
>I don't have the book so I have no idea what steps it details before the
code you posted but I would guess that you forgot to add a reference to
the
CRM web service (or you named it something else than CrmSdk). Also verify
that the address to your crm server is indeed http://crm as the
service.Url
line indicates

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:A8**********************************@microso ft.com...
Very new to this but using the MS working with dynamics CRM 3.0 book to
run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name 'CrmSdk'
does
not
exist in the class or namespace 'WorkingWithCrm' (are you missing an
assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be passed in
to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname", "lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(), leadId,
cols);

// Display the results.
// Since we have strongly typed the responce, we can just access the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.



Oct 23 '06 #4
Claes,

Hmm interesting the url returns the following;

The record that you are requesting is currently unavailable. Either the
record was not found or you do not have sufficent security permissions to
view it.

I was under the impression from the book that I am using a default record GUID

Have changed the URL to a GUID from the Database and now it shows the
record, however once I run the whole thing asd a web app I still see a blank
page?

So one thing at a time any more good sugestions like the last?

Roy

"Claes Bergefall" wrote:
The code looks correct to me. Are you sure that the GUID is correct (does
http://crm/sfa/leads/edit.aspx?id={2EFAB039-2543-428E-95B8-10EA13D58198}
work)? Do you get any exception?

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:14**********************************@microsof t.com...
Claes,

Cheers for that we found that some how CrmSdk had been changed to all
lower
case within visual 2003. All seems to run without errors however the page
produced by internet explorer has no data in it.

Any further ideas.

Roy

"Claes Bergefall" wrote:
I don't have the book so I have no idea what steps it details before the
code you posted but I would guess that you forgot to add a reference to
the
CRM web service (or you named it something else than CrmSdk). Also verify
that the address to your crm server is indeed http://crm as the
service.Url
line indicates

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:A8**********************************@microsof t.com...
Very new to this but using the MS working with dynamics CRM 3.0 book to
run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name 'CrmSdk'
does
not
exist in the class or namespace 'WorkingWithCrm' (are you missing an
assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be passed in
to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname", "lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(), leadId,
cols);

// Display the results.
// Since we have strongly typed the responce, we can just access the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.



Oct 23 '06 #5
As far as I know there are no default GUIDs, they are unique in every
installation so you must find one that exists on your system.

You need to start debugging and see if you get a lead or if there are any
exceptions thrown. Also verify that you have permissions to work with lead
records.

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
Claes,

Hmm interesting the url returns the following;

The record that you are requesting is currently unavailable. Either the
record was not found or you do not have sufficent security permissions to
view it.

I was under the impression from the book that I am using a default record
GUID

Have changed the URL to a GUID from the Database and now it shows the
record, however once I run the whole thing asd a web app I still see a
blank
page?

So one thing at a time any more good sugestions like the last?

Roy

"Claes Bergefall" wrote:
>The code looks correct to me. Are you sure that the GUID is correct (does
http://crm/sfa/leads/edit.aspx?id={2EFAB039-2543-428E-95B8-10EA13D58198}
work)? Do you get any exception?

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:14**********************************@microso ft.com...
Claes,

Cheers for that we found that some how CrmSdk had been changed to all
lower
case within visual 2003. All seems to run without errors however the
page
produced by internet explorer has no data in it.

Any further ideas.

Roy

"Claes Bergefall" wrote:

I don't have the book so I have no idea what steps it details before
the
code you posted but I would guess that you forgot to add a reference
to
the
CRM web service (or you named it something else than CrmSdk). Also
verify
that the address to your crm server is indeed http://crm as the
service.Url
line indicates

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:A8**********************************@microso ft.com...
Very new to this but using the MS working with dynamics CRM 3.0 book
to
run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name 'CrmSdk'
does
not
exist in the class or namespace 'WorkingWithCrm' (are you missing an
assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be passed
in
to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname", "lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(),
leadId,
cols);

// Display the results.
// Since we have strongly typed the responce, we can just access the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.




Oct 24 '06 #6
Hi Claes,

Thank for the input, however.

Yes sussed that one out, ref GUID went directly to the CRM database and
found a VALID leadId GUID.

Confirmed that this worked by entering the whole url into a browser.
http://crm/sfa/leads/edit.aspx?id={dc5ed1f4-cb47-db11-935f-009027289cc8}
This returned the correct record within the web browser.
However when this was used within the .Net app script the browser still
returned no data
I presume that as the url when entered into the browser directly returned
the correct record I must have the correct permissions to access this data.

Running debug from within visual brings up the web browser the web browser
informs you that the web page has been found, then states done but still
shows no data.

The result of the debug is as follows;

------ Build started: Project: WorkingWithCrm, Configuration: Debug .NET
------

Preparing resources...
Updating references...
Performing main compilation...

Build complete -- 0 errors, 0 warnings
Building satellite assemblies...

---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped

Debug

Auto-attach to process '[2372] w3wp.exe' on machine 'TEST-EX' succeeded.
'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll', No symbols
loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll', No
symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.directoryservices\ 1.0.5000.0__b03f5f7f11d50a3a\system.directoryservi ces.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.messaging\1.0.5000 .0__b03f5f7f11d50a3a\system.messaging.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.serviceprocess\1.0 .5000.0__b03f5f7f11d50a3a\system.serviceprocess.dl l', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system.data.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll', No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web.regularexpress ions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regul arexpressions.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll', No symbols
loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll', No
symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system.data.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.directoryservices\ 1.0.5000.0__b03f5f7f11d50a3a\system.directoryservi ces.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.regularexpress ions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regul arexpressions.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\zjmt2wwi.dl l', Symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\gy8kwiyh.dl l', Symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.services\1.0.5 000.0__b03f5f7f11d50a3a\system.web.services.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.ui.mobilecontr ols.adapters\1.1.0.0__b03f5f7f11d50a3a\system.web. ui.mobilecontrols.adapters.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.mobile\1.0.500 0.0__b03f5f7f11d50a3a\system.web.mobile.dll', No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\assembly\dl 2\e69cb531\d0c67c78_77f7c601\workingwithcrm.dll', Symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\zlmyg5ey.dl l', Symbols loaded.
The program '[2372] w3wp.exe:
/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000' has exited with code 0
(0x0).
The program '[2372] w3wp.exe: DefaultDomain' has exited with code 0 (0x0).

So where do I go from here? Any suggestions?

"Claes Bergefall" wrote:
As far as I know there are no default GUIDs, they are unique in every
installation so you must find one that exists on your system.

You need to start debugging and see if you get a lead or if there are any
exceptions thrown. Also verify that you have permissions to work with lead
records.

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
Claes,

Hmm interesting the url returns the following;

The record that you are requesting is currently unavailable. Either the
record was not found or you do not have sufficent security permissions to
view it.

I was under the impression from the book that I am using a default record
GUID

Have changed the URL to a GUID from the Database and now it shows the
record, however once I run the whole thing asd a web app I still see a
blank
page?

So one thing at a time any more good sugestions like the last?

Roy

"Claes Bergefall" wrote:
The code looks correct to me. Are you sure that the GUID is correct (does
http://crm/sfa/leads/edit.aspx?id={2EFAB039-2543-428E-95B8-10EA13D58198}
work)? Do you get any exception?

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:14**********************************@microsof t.com...
Claes,

Cheers for that we found that some how CrmSdk had been changed to all
lower
case within visual 2003. All seems to run without errors however the
page
produced by internet explorer has no data in it.

Any further ideas.

Roy

"Claes Bergefall" wrote:

I don't have the book so I have no idea what steps it details before
the
code you posted but I would guess that you forgot to add a reference
to
the
CRM web service (or you named it something else than CrmSdk). Also
verify
that the address to your crm server is indeed http://crm as the
service.Url
line indicates

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:A8**********************************@microsof t.com...
Very new to this but using the MS working with dynamics CRM 3.0 book
to
run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name 'CrmSdk'
does
not
exist in the class or namespace 'WorkingWithCrm' (are you missing an
assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be passed
in
to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname", "lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(),
leadId,
cols);

// Display the results.
// Since we have strongly typed the responce, we can just access the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.




Oct 24 '06 #7
Set a break point on the line where you retreive the lead from CRM and
verify that you actually get something. Then examine the oLead object in a
watch window and see what it contains. You still haven't answered if you get
any exceptions. Move everything out of the try...catch block and see if it
blows up somewhere and, if so, what exception you get. Also examine the
source of the web page when it looks like it's done

/claes
"rfinch" <rf****@discussions.microsoft.comwrote in message
news:EF**********************************@microsof t.com...
Hi Claes,

Thank for the input, however.

Yes sussed that one out, ref GUID went directly to the CRM database and
found a VALID leadId GUID.

Confirmed that this worked by entering the whole url into a browser.
http://crm/sfa/leads/edit.aspx?id={dc5ed1f4-cb47-db11-935f-009027289cc8}
This returned the correct record within the web browser.
However when this was used within the .Net app script the browser still
returned no data
I presume that as the url when entered into the browser directly returned
the correct record I must have the correct permissions to access this
data.

Running debug from within visual brings up the web browser the web browser
informs you that the web page has been found, then states done but still
shows no data.

The result of the debug is as follows;

------ Build started: Project: WorkingWithCrm, Configuration: Debug .NET
------

Preparing resources...
Updating references...
Performing main compilation...

Build complete -- 0 errors, 0 warnings
Building satellite assemblies...

---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped

Debug

Auto-attach to process '[2372] w3wp.exe' on machine 'TEST-EX' succeeded.
'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll', No symbols
loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll',
No
symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.directoryservices\ 1.0.5000.0__b03f5f7f11d50a3a\system.directoryservi ces.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.messaging\1.0.5000 .0__b03f5f7f11d50a3a\system.messaging.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.serviceprocess\1.0 .5000.0__b03f5f7f11d50a3a\system.serviceprocess.dl l',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system.data.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web.regularexpress ions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regul arexpressions.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll', No symbols
loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll',
No
symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system.data.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.directoryservices\ 1.0.5000.0__b03f5f7f11d50a3a\system.directoryservi ces.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.regularexpress ions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regul arexpressions.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\zjmt2wwi.dl l', Symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\gy8kwiyh.dl l', Symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.services\1.0.5 000.0__b03f5f7f11d50a3a\system.web.services.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.ui.mobilecontr ols.adapters\1.1.0.0__b03f5f7f11d50a3a\system.web. ui.mobilecontrols.adapters.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\assembly\gac\system.web.mobile\1.0.500 0.0__b03f5f7f11d50a3a\system.web.mobile.dll',
No symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\assembly\dl 2\e69cb531\d0c67c78_77f7c601\workingwithcrm.dll',
Symbols loaded.
'/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\workingwithcrm\1947fd5e\251b7787\zlmyg5ey.dl l', Symbols loaded.
The program '[2372] w3wp.exe:
/LM/w3svc/1/root/WorkingWithCrm-2-128061695924375000' has exited with code
0
(0x0).
The program '[2372] w3wp.exe: DefaultDomain' has exited with code 0 (0x0).

So where do I go from here? Any suggestions?

"Claes Bergefall" wrote:
>As far as I know there are no default GUIDs, they are unique in every
installation so you must find one that exists on your system.

You need to start debugging and see if you get a lead or if there are any
exceptions thrown. Also verify that you have permissions to work with
lead
records.

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:D3**********************************@microso ft.com...
Claes,

Hmm interesting the url returns the following;

The record that you are requesting is currently unavailable. Either the
record was not found or you do not have sufficent security permissions
to
view it.

I was under the impression from the book that I am using a default
record
GUID

Have changed the URL to a GUID from the Database and now it shows the
record, however once I run the whole thing asd a web app I still see a
blank
page?

So one thing at a time any more good sugestions like the last?

Roy

"Claes Bergefall" wrote:

The code looks correct to me. Are you sure that the GUID is correct
(does
http://crm/sfa/leads/edit.aspx?id={2EFAB039-2543-428E-95B8-10EA13D58198}
work)? Do you get any exception?

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:14**********************************@microso ft.com...
Claes,

Cheers for that we found that some how CrmSdk had been changed to
all
lower
case within visual 2003. All seems to run without errors however the
page
produced by internet explorer has no data in it.

Any further ideas.

Roy

"Claes Bergefall" wrote:

I don't have the book so I have no idea what steps it details
before
the
code you posted but I would guess that you forgot to add a
reference
to
the
CRM web service (or you named it something else than CrmSdk). Also
verify
that the address to your crm server is indeed http://crm as the
service.Url
line indicates

/claes

"rfinch" <rf****@discussions.microsoft.comwrote in message
news:A8**********************************@microso ft.com...
Very new to this but using the MS working with dynamics CRM 3.0
book
to
run
web application to retrieve lead records from CRM 3.0.
Have followed the book instructions on page 380-382.

But am getting the following in ie 7.

Compiler Error Message: CS0234: The type or namespace name
'CrmSdk'
does
not
exist in the class or namespace 'WorkingWithCrm' (are you missing
an
assembly
reference?)

A copy of the code is below.

<%@ Page language="c#" %>
<%@ Import Namespace="WorkingWithCrm.CrmSdk" %>

<!DOCTYPE HTML PUBLIC "-//W3C//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<script runat="server">

protected void page_Loaded(object sender, EventArgs e)
{
// Standard CRM Service Setup
CrmService service = new CrmService();
service.Credentials =
System.Net.CredentialCache.DefaultCredentials;
service.Url = "http://crm/mscrmservices/2006/crmservice.asmx";
// we are using a known lead GUID. In practrice, this will be
passed
in
to
your routines.
Guid leadId = new Guid("2EFAB039-2543-428E-95B8-10EA13D58198");

// Set the columns to return.
ColumnSet Cols = new ColumnSet();
cols.Attributes = new string [] {"subject", "firstname",
"lastname",
"industrycode"};

try
{
//retrieve the record, casting it as the entity.
lead oLead = (lead)service.retrieve(EntityName.lead.ToString(),
leadId,
cols);

// Display the results.
// Since we have strongly typed the responce, we can just access
the
properties of our object.
Response.Write("Topic: " + oLead.subject + "<br>");
Response.Write("First Name: " + oLead.firstname + "<br>");
Response.Write("Last Name: " + oLead.lastname + "<br>");
Response.Write("Industr: " + oLead.industrycode + "<br>");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
// Handle error.
}
}
</script>

<html>
<head runat="server" id="Head1">
<title>Retrieve Lead</title>
<Style>body { font-family:Tahoma;font-size:9pt; }</Style>
</head>
<form id="crmForm" runat="server">
</form>
</body>
</html>
Any advice would be much appreciated.





Oct 24 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry =...
0
by: Andy | last post by:
Hi All. I'm working for a company that has set out a guideline for retrieving data from a database. Nobody can explain to me the reason for the following. When retrieving a set of records...
17
by: Rico | last post by:
Hello, I am in the midst of converting an Access back end to SQL Server Express. The front end program (converted to Access 2003) uses DAO throughout. In Access, when I use recordset.AddNew I...
10
by: Bhavna | last post by:
I am using a Replace function to replace single quotes with double when submitting a text field in the database i.e. Replace (q, "'", "' ' ") which works fine. When I retrieve the field from the...
11
by: Nemisis | last post by:
Hi everyone, sorry if this post gets really long, i just wanna make sure i fully explain what i am trying to do. I am new to OOP and .net 2.0, so if this is obvious, i am sorry. I have wrote a...
4
by: Mark Olbert | last post by:
I am struggling with trying to retrieve the value of an autoincrement identity field after a DetailsView Insert operation. The DetailsView is bound to an SqlDataSource control. So far as I can...
15
by: gunnar.sigurjonsson | last post by:
I´m having some problem retrieving identity value from my newly inserted row into a view. I have two tables T1 and T2 which I define as following CREATE TABLE T1 ( id BIGINT GENERATED ALWAYS...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
3
ADezii
by: ADezii | last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.