By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

Retrieving lead record from CRM 3.0

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.