Object.Retrieve methods for CRM business objects

Hi,

I am coding up some work currently, and have a relatively simple question
relating to the .Retrieve method of the CRM business objects, such as
CRMQuote.

I am trying to manipulate the data contained in the CRMQuote entity, and the
simplest way is for me to read the xml string returned by the retrieve
method into a dataset.  The problem that I am facing is that I require that
all of the columns are returned for the entity.  The SDK suggests this is
possible by simply passing a blank string or null paramater to the Retrieve
method

{from the SDK}

--

Public Function Retrieve(
  ByVal Caller As CUserAuth,
  ByVal QuoteId As String,
  ByVal ColumnSetXml As String
) As String

ColumnSetXml
Specifies an XML string describing the set of columns that is to be
retrieved. Passing "" or null returns all columns.

--

However, it would appear that the retrieve method only returns columns that
contain data.  Any columns that do not contain data are not included in the
returned columnset, and therefore not created in my dataset datatable.

If anyone can help me with this and let me know whether there is a means of
returning all columns regardless of whether they retain values, that would
be greatly appreciated.

Cheers

Chris


0
Chris
5/28/2004 6:16:07 AM
crm 35858 articles. 1 followers. Follow

5 Replies
599 Views

Similar Articles

[PageSpeed] 17

Hi,

How does you query look like? I have been doing some 
query stuff and there are not all reliable in the 
documentation.

Monika

>-----Original Message-----
>Hi,
>
>I am coding up some work currently, and have a 
relatively simple question
>relating to the .Retrieve method of the CRM business 
objects, such as
>CRMQuote.
>
>I am trying to manipulate the data contained in the 
CRMQuote entity, and the
>simplest way is for me to read the xml string returned 
by the retrieve
>method into a dataset.  The problem that I am facing is 
that I require that
>all of the columns are returned for the entity.  The SDK 
suggests this is
>possible by simply passing a blank string or null 
paramater to the Retrieve
>method
>
>{from the SDK}
>
>--
>
>Public Function Retrieve(
>  ByVal Caller As CUserAuth,
>  ByVal QuoteId As String,
>  ByVal ColumnSetXml As String
>) As String
>
>ColumnSetXml
>Specifies an XML string describing the set of columns 
that is to be
>retrieved. Passing "" or null returns all columns.
>
>--
>
>However, it would appear that the retrieve method only 
returns columns that
>contain data.  Any columns that do not contain data are 
not included in the
>returned columnset, and therefore not created in my 
dataset datatable.
>
>If anyone can help me with this and let me know whether 
there is a means of
>returning all columns regardless of whether they retain 
values, that would
>be greatly appreciated.
>
>Cheers
>
>Chris
>
>
>.
>
0
Monika
5/28/2004 8:13:48 AM
Hi,
Try the use a null filter as follow:

NullFilterXml :=
   <filter
      column='column-name'
      operator=('null' | 'not-null') />

Notice: When you put the xml into a dataset, if the tag have attributes it
will mapped to a table.
Example:
<activities>
    <activity>
        <subject>Eu AMO MARIANA.</subject>
        <scheduledstart date='28/05/2004'
Time='09:10">2004-05-28T09:10:00</scheduledstart>
    </activity>
</activities>

Whe you load this in the dataset will get the tables:
Table: activity
Columns: activity_Id (auto-generated by dataset), subject

Tables: scheduledstart
Columns: activity_Id, date, time, scheduledstart_Text

Relations: activity_scheduledstart (activity_Id vs activity_Id)

I hope who that help.

[]'s
Vin�cius Pitta Lima de Ara�jo

"Chris Ericoli" <cericoliNOspm@removethisfamill.com.au> escreveu na mensagem
news:40b6da9e$1@dnews.tpgi.com.au...
> Hi,
>
> I am coding up some work currently, and have a relatively simple question
> relating to the .Retrieve method of the CRM business objects, such as
> CRMQuote.
>
> I am trying to manipulate the data contained in the CRMQuote entity, and
the
> simplest way is for me to read the xml string returned by the retrieve
> method into a dataset.  The problem that I am facing is that I require
that
> all of the columns are returned for the entity.  The SDK suggests this is
> possible by simply passing a blank string or null paramater to the
Retrieve
> method
>
> {from the SDK}
>
> --
>
> Public Function Retrieve(
>   ByVal Caller As CUserAuth,
>   ByVal QuoteId As String,
>   ByVal ColumnSetXml As String
> ) As String
>
> ColumnSetXml
> Specifies an XML string describing the set of columns that is to be
> retrieved. Passing "" or null returns all columns.
>
> --
>
> However, it would appear that the retrieve method only returns columns
that
> contain data.  Any columns that do not contain data are not included in
the
> returned columnset, and therefore not created in my dataset datatable.
>
> If anyone can help me with this and let me know whether there is a means
of
> returning all columns regardless of whether they retain values, that would
> be greatly appreciated.
>
> Cheers
>
> Chris
>
>


0
Vin
5/28/2004 12:14:38 PM
Hi Monika

Thank you for your reply, however I am not using the CRMquery object, but
rather the Retrieve method of the CRMQuote object, as such there is no Fetch
XML schema, merely a ColumnSet XML string:

Public Function ReturnQuoteByID(ByVal oID As String) As DataTable

Dim crmQuote As New Microsoft.CRM.Proxy.CRMQuote

Dim Results As String

Dim dsResults As New DataSet

Try

crmQuote.Credentials = credAdmin

crmQuote.Url = srvDirectory + "CRMQuote.srf"

Results = crmQuote.Retrieve(CUserAuth, oID, "")

dsResults.ReadXml(New IO.StringReader(Results))

Return dsResults.Tables("quote")

Catch soapex As Web.Services.Protocols.SoapException

Catch ex As Exception

End Try

End Function


"Monika" <anonymous@discussions.microsoft.com> wrote in message
news:1424601c4448b$b44e4db0$a101280a@phx.gbl...
> Hi,
>
> How does you query look like? I have been doing some
> query stuff and there are not all reliable in the
> documentation.
>
> Monika
>
> >-----Original Message-----
> >Hi,
> >
> >I am coding up some work currently, and have a
> relatively simple question
> >relating to the .Retrieve method of the CRM business
> objects, such as
> >CRMQuote.
> >
> >I am trying to manipulate the data contained in the
> CRMQuote entity, and the
> >simplest way is for me to read the xml string returned
> by the retrieve
> >method into a dataset.  The problem that I am facing is
> that I require that
> >all of the columns are returned for the entity.  The SDK
> suggests this is
> >possible by simply passing a blank string or null
> paramater to the Retrieve
> >method
> >
> >{from the SDK}
> >
> >--
> >
> >Public Function Retrieve(
> >  ByVal Caller As CUserAuth,
> >  ByVal QuoteId As String,
> >  ByVal ColumnSetXml As String
> >) As String
> >
> >ColumnSetXml
> >Specifies an XML string describing the set of columns
> that is to be
> >retrieved. Passing "" or null returns all columns.
> >
> >--
> >
> >However, it would appear that the retrieve method only
> returns columns that
> >contain data.  Any columns that do not contain data are
> not included in the
> >returned columnset, and therefore not created in my
> dataset datatable.
> >
> >If anyone can help me with this and let me know whether
> there is a means of
> >returning all columns regardless of whether they retain
> values, that would
> >be greatly appreciated.
> >
> >Cheers
> >
> >Chris
> >
> >
> >.
> >


0
Chris
5/28/2004 11:34:42 PM
Hi Vinicius,

I had thought about using a CRMQuery object rather than the Retrieve method
exactly because i thought the null filter might work.  But on further
reading, it appears that there are two problems - one is that I would have
to specifiy all of the columns that I require, when I actually require all
of them, and secondly that the null filter I believe is there to return rows
only when they meet the condition, ie contain null or not null.

Cheers

Chris
"Vin�cius Pitta Lima de Ara�jo" <vinipitta@yahoo.com.br> wrote in message
news:Omz7P2KREHA.1620@TK2MSFTNGP12.phx.gbl...
> Hi,
> Try the use a null filter as follow:
>
> NullFilterXml :=
>    <filter
>       column='column-name'
>       operator=('null' | 'not-null') />
>
> Notice: When you put the xml into a dataset, if the tag have attributes it
> will mapped to a table.
> Example:
> <activities>
>     <activity>
>         <subject>Eu AMO MARIANA.</subject>
>         <scheduledstart date='28/05/2004'
> Time='09:10">2004-05-28T09:10:00</scheduledstart>
>     </activity>
> </activities>
>
> Whe you load this in the dataset will get the tables:
> Table: activity
> Columns: activity_Id (auto-generated by dataset), subject
>
> Tables: scheduledstart
> Columns: activity_Id, date, time, scheduledstart_Text
>
> Relations: activity_scheduledstart (activity_Id vs activity_Id)
>
> I hope who that help.
>
> []'s
> Vin�cius Pitta Lima de Ara�jo
>
> "Chris Ericoli" <cericoliNOspm@removethisfamill.com.au> escreveu na
mensagem
> news:40b6da9e$1@dnews.tpgi.com.au...
> > Hi,
> >
> > I am coding up some work currently, and have a relatively simple
question
> > relating to the .Retrieve method of the CRM business objects, such as
> > CRMQuote.
> >
> > I am trying to manipulate the data contained in the CRMQuote entity, and
> the
> > simplest way is for me to read the xml string returned by the retrieve
> > method into a dataset.  The problem that I am facing is that I require
> that
> > all of the columns are returned for the entity.  The SDK suggests this
is
> > possible by simply passing a blank string or null paramater to the
> Retrieve
> > method
> >
> > {from the SDK}
> >
> > --
> >
> > Public Function Retrieve(
> >   ByVal Caller As CUserAuth,
> >   ByVal QuoteId As String,
> >   ByVal ColumnSetXml As String
> > ) As String
> >
> > ColumnSetXml
> > Specifies an XML string describing the set of columns that is to be
> > retrieved. Passing "" or null returns all columns.
> >
> > --
> >
> > However, it would appear that the retrieve method only returns columns
> that
> > contain data.  Any columns that do not contain data are not included in
> the
> > returned columnset, and therefore not created in my dataset datatable.
> >
> > If anyone can help me with this and let me know whether there is a means
> of
> > returning all columns regardless of whether they retain values, that
would
> > be greatly appreciated.
> >
> > Cheers
> >
> > Chris
> >
> >
>
>


0
Chris
5/28/2004 11:58:51 PM
That's by design. You might want to look at using something other that
ADO.Net. The XML returned from the platform has been trimmed down to be as
small as possible. There was a lot of debate on the team about how to handle
this and the 'smaller-is-better' crowd won.

"Chris Ericoli" <cericoliNOspm@removethisfamill.com.au> wrote in message
news:40b6da9e$1@dnews.tpgi.com.au...
> Hi,
>
> I am coding up some work currently, and have a relatively simple question
> relating to the .Retrieve method of the CRM business objects, such as
> CRMQuote.
>
> I am trying to manipulate the data contained in the CRMQuote entity, and
the
> simplest way is for me to read the xml string returned by the retrieve
> method into a dataset.  The problem that I am facing is that I require
that
> all of the columns are returned for the entity.  The SDK suggests this is
> possible by simply passing a blank string or null paramater to the
Retrieve
> method
>
> {from the SDK}
>
> --
>
> Public Function Retrieve(
>   ByVal Caller As CUserAuth,
>   ByVal QuoteId As String,
>   ByVal ColumnSetXml As String
> ) As String
>
> ColumnSetXml
> Specifies an XML string describing the set of columns that is to be
> retrieved. Passing "" or null returns all columns.
>
> --
>
> However, it would appear that the retrieve method only returns columns
that
> contain data.  Any columns that do not contain data are not included in
the
> returned columnset, and therefore not created in my dataset datatable.
>
> If anyone can help me with this and let me know whether there is a means
of
> returning all columns regardless of whether they retain values, that would
> be greatly appreciated.
>
> Cheers
>
> Chris
>
>


0
Mj
6/2/2004 3:11:30 AM
Reply:

Similar Artilces:

Test Servers
We have taken snapshots of both our production Great Plains(w/SQL2000) and Business Portal Servers. Is it possible to go into the snapshots and rename them to create a Test Server Pair that have all the proper tables links, IIS settings, etc. to each other? How hard is this to do? We want to be able to log onto the test portal and make changes to the test Great Plains data. Also we want to be able to test any patches on the test pair before "going live". Is there a procedure, whitepaper, or ???, that might cover how to make this work? Thanks in advance for any help or guida...

Retrieve mail from badmail
The badmail folder filled up with mail to a non existing address. Now the adderss exists, and I'd like to get the mail from the badmail dir to the new address. Is this possible? Win2k3, exch2003. On Thu, 19 May 2005 12:36:53 +0200, "Eirik" <bla@bla.bla> wrote: >The badmail folder filled up with mail to a non existing address. Now the >adderss exists, and I'd like to get the mail from the badmail dir to the new >address. Is this possible? > >Win2k3, exch2003. > Resending it would be the best thing. Not sure I understand why it's in your badmail...

Problems Importing Leads into CRM 3.0
Guys, Having a problem importing Leads. I have created a CSV file like always, gone through and linked all source fields with CRM fields, and then completed the mapping...i then hit finish and look at it in My Activities, Bulk Imports...and it says Pending, No. of Successes = 0 No. of Failures = 0. There are 2000 odd records in the file... I saw a post from John O'Donnell and have copied it in below. This i have tried but to no avail. Does anyone else have any suggestions? Many thanks in advance Ben The bulk import tool use the workflow service. Try setting the account for ...

Delay in Internal CRM E-Mail Tracking
Does anyone else have this problem? 1. Create an e-mail using CRM. 2. Send e-mail to internal CRM users. 3. E-mail shows up in the Internal Users Outlook inbox, but the icon is a standard Outlook icon, not a CRM icon. If the e-mail is opened, the "Track in CRM" is not enabled, and the "Regarding" is blank. But the Subject line does have the CRM Tracking number. 4. After about 2 - 3 minutes, the icon will change from the Outlook icon to a CRM icon, and the "Regarding" field is pointing to the CRM entity that the e-mail was sent from. Why the delay? Stev...

CRM 4.0 SDK Web Services, 401 Authentication Issues
I'm trying to use the SDK to develop some custom pages that will be used as Iframes in CRM 4.0. My code to connect to the Web Service is as follows: CrmService myservice = new CrmService(); myservice.Credentials = System.Net.CredentialCache.DefaultCredentials; CrmAuthenticationToken token = new CrmAuthenticationToken(); myservice.CrmAuthenticationTokenValue = token; token.OrganizationName = this.Request.QueryString["orgname"]; token.AuthenticationType = 0; The code runs great on my l...

Tee-Object and an -Append option
The cmdlet Tee-Object has no -Append option for use when a file object is the target to be written to. There is an existing issue for this opened at connect.microsoft.com/PowerShell https://connect.microsoft.com/PowerShell/feedback/details/137702 but is has been Closed (Won't Fix) with no comment justifying that action by Microsoft. Should we reinstate a request for a product change to add the -Append option to the Tee-Object cmdlet? - Larry On Apr 14, 1:49=A0pm, Larry__Weiss <l...@airmail.net> wrote: > The cmdlet Tee-Object has no -Append option for ...

Client method called by RegisterStartupScript is firing but UI isn't updating
Can somebody look at the below code and tell me what I am doing wrong. I am uploading files and need to report back to the client when each upload has completed. for(i=0;i<=Request.Files.Count;i++) { int percentComplete = (int)Math.Ceiling((double)(i + 1) / (double) Request.Files.Count * 100); string message = string.Format("{0} of {1} uploaded", i + 1, Request.Files.Count); ScriptManager.RegisterStartupScript(this, this.GetType(), "progress" + i, @"do_progress('" + message + "','" + percentComplete + "');",...

URGENT
I've created functions in .Net to add/update/delete Accounts, Contacts, Notes and, from time to time when I'm debugging in .Net and goes over a line of code like: bizUser = New Microsoft.Crm.Platform.Proxy.BizUser the debugger halts and I get the error "There is no source code available for the current location" (sorry if the message is not exact, I had to translate it from French which is "Il n'y a pas de code source disponible pour l'emplacement en cours.". And i can't go any further with debugging. I have a Windows server 2003 Standard editi...

Object Not Found
I am having all types of trouble with my exchange 2003 sp1 on Windows 2000 server. This is a fresh instlal and the only box in active directory. I think it had been installed before I don't know if they didn't remove it properly or what...anyway I have followed KB 822444 about creatinga GUID When clients synchronize with Exchange, they get messages pertaining to Object Not Found, when I review the Sync Issues it shows Offline Address Book problems. I can get more details tomorrow at work So I have deleted the offline address book rebuilt, tried putting int he kb article GU...

convert quicken home & business to money
I would really like to switch to ms money for small business as I need to make invoices and much prefer Money products/service. As it is only sold in the US, would it still work if I was able to get it and would it convert my Canadian Quicken files? -C- ...

How to restore CWnd object if it is released by OS?
Hi All I build an MFC app, and loadlibrary a dll which use high priority (realtime level ) threads for serial communication before loadlibrary, the dialog object has some CStatic objects and CEdit objects but after freelibrary the dll, some CStatic and CEdit objects not valid, their m_hWnd is NULL How can I restore these CWnd objects? is OS release these CWnd objects thanks ...

Entering company name in CRM
Here is the very short scenario: I visited a new prospect, took his business card, and came back to the office to enter his card into CRM. When I start entering his card info, there is nowhere to find where I could enter the Company name.. Maybe I didn't look properly? Any help on this simple issue would really be appreciated. Thanks, Steve You are correct. In contacts I added a field for company. If I use Account, I just use the account name field for the company name. If you start the prospect out as a lead, there is a place to put the company name. "Steven Janes"...

Promote Email to CRM Object, attach to case
I find it quite strange that one is not able to attach an email to a case if received in Outlook Inbox. Click on promot email, select regarding (and list doesnt contain case list). sure one can attach it to the contact involved in teh case, but that'll clutter the contact activities with case-related issues... Surely this should be able to be done? ...

Office Small Business 2007 installation problems trying to replace Professional 2007 Trial version
My trial version of Microsoft Office Professional 2007 is about to come to an end and I'm hoping to replace it with a purchased copy of Microsoft Office Small Business 2007. The installation seems to progress error free yet when I launch Outlook I'm being prompted to renew Office Professional online. I'd like to avoid having to de-install Office Professional, can this be done? -- Gooner99 ------------------------------------------------------------------------ Gooner99's Profile: http://forums.techarena.in/members/214762.htm View this thread: http://forums.tech...

MSMQ arrives but receive event method is never called
Hi all, I work with msmq and it works fine using BinaryMessageFormatter and sendig/receiving class objects. However trying to send simple string fails. I can see in the jounal queue that message does arrive but the receive event method inside my code is never called. Following is the code that creates the que and later the receive event method. Can someone advice please? Regards Gomez if (!MessageQueue.Exists(".\\Private$\\UDP_DLL_Que")) { UDP_Dll_Que = MessageQueue.Create(".\\Private$\\UDP_DLL_Que"); UDP_Dll_Que.Label = "UDP_DLL_Q...

The IE closes automatically when I access the CRM site.
Hi all, I installed the MS CRM 3.0 just now. I opened the IE and tried to access http://crmwebsitename. But when I inputed domain account name and password, the IE closed automatically! Why? Thanks in advance. Alan Hello Alan, deactivate all your popup-blockers and it will work... Mario Knezevic > Hi all, > I installed the MS CRM 3.0 just now. > I opened the IE and tried to access http://crmwebsitename. > But when I inputed domain account name and password, the IE closed > automatically! > Why? > > Thanks in advance. > > Alan > ...

Application defined or object defined error
Hi All Here is a strange one I have a command button that envokes code "mnuExit" - this code does a bunch of different things and then closes the excel file. I have more code in the BeforeClose and Workbook_Deactivate events. Everything runs properly if there are no other Excel Files open - however - IF there are other excel files open once all the code has finished running I get a dialogue box that says: "Applicatiob-defined or object-defined error" there is no 1004 or anything else - and there is nothing in my code that is causing this error - I have s...

Dave Ashish method of updating from previous record
I need to enter the Height of the patient every time the form opens. The name of the control is [Fld37]. Yes I will name it better next time! I used Dave Ashish method and entered the expression in the default value of the control's data. The following is the expression it created after I typed in the code in the expression builder (the only option it will give me). = const cHeight="""" me![Fld37].defaultValue=cHeight&me![Fld37].Value&cHeight It is not working and flashes the following error message: You might have entered an...

Outlook plugin for CRM 4.0
Hello, I have a user that has been running CRM with Outlook 2007 on Windows XP with no problems. Now we just upgraded his LPT to Windows 7 and his CRM Outlook Plugin connection is timing out on him. Is there a way to change the time out setting so it will stay logged in? His Outlook does not have the problem only his CRM. Thanks Steve On Jul 22, 4:58=A0am, Steve <St...@discussions.microsoft.com> wrote: > Hello, > =A0 I have a user that has been running CRM with Outlook 2007 on Windows = XP > with no problems. =A0Now we just upgraded his LPT to Windows 7 and his CR= M ...

CRM 3.0 The attachment is either not a valid type or is too large
Hello, Email routing appears to be working in CRM properly. Outgoing emails are being sent with and without attachements. Incoming emails are only being tracked when a user presses the Track In CRM button on their Outlook CRM Toolbar. Emails without attachments are being tracked properly. However, if an email has an attachment, the following error comes up: CRM 3.0 The attachment is either not a valid type or is too large I have tried to test this with txt file that was 5 KB and it gave the same error message. I have verified on the server's registry that the maximum attachment siz...

crm reports 06-01-04
When I click on reports and select one then click go - a message comes back saying CrystalReportViewer: "max processing time/max records limit reached" Has anyone recieved this? Does anyone know why this is happening? Jen I had this problem yesterday, I think it is caused by Crystal timing out. I fixed it by going into the Crystal Configuration Manager, stop the Page Server service, then right click on it and select properties. Add the following to the end of the text in the command box: -maxDBResultRecords 0 If you can get onto PartnerSource see tech doc #33881 for the so...

CRM mail router
When installing router I must select web site on my exchange server.Is it required install router to Default web site??Or I can select new web? Thanks FK "Fanda Koudel" <FandaKoudel@discussions.microsoft.com> wrote in message news:A884B45A-8243-4BE0-B281-D26303086CFA@microsoft.com... > When installing router I must select web site on my exchange server.Is it > required install router to Default web site??Or I can select new web? > Thanks FK > This is for the web site of the CRM site. The exchange router will use this information to connect to the crm site fo...

SharePoint/Business Portal, Office Web Component
Help. I have an intranet site using Sharepoint and Business Portal functions. The users are all off-site using their home computers to access. There are lists rendered as queries within the site that should be exportable to excel. Most users can do this using Office Web Component - and some never have to download the component. OWC is not available for users with Office 2007, so they are unable to download the query files into excel. Is it necessary for an Office 2007 user to purchase Office Project 2007 in order to be able to download from the site to excel? Am I even on the co...

Vista Business Upgrade Questions from an XP guy
Is MS selling Vista Business anymore? I go on the Windows Catalog website and I can't find it being offered. I have a perfectly functioning Win XP SP3 laptop. I've heard both sides of the upgrade issue. 1. Where can I buy Windows Vista Business? I don't want to get it from some unreputable vendor. Will the version I buy contain the latest SP's? 2. My XP was OEM, does that cause major issues when upgrading to Vista? 3. I ran the Vista upgrade advisor and it states my laptop will handle Vista if a do a few tasks first. Are the other resources regarding upgrading t...

Problem with security of Notes in shared object...
I have configured all security roles with privileges to add and modify NOTES on user level and read on Organization level. I change relationships between Notes and other object from Parental to "Configurable Cascading" and set Assign, Reparent , Sharing as Cascade- None. Case: I have ownership to Opportunity record and add own notes, than I share this Opportunity to other users with Read & Append privilligies. They add own notes and can't modify my notes. It's OK but unfortunatelly when I open Opportunity - i can change Notes of others users despite the security role d...