CRM customization 07-24-06

I am trying to build a dataset using C#  on fetching accounts. I need
to define a primary key on the dataset, so I  can search on the basis
of the primary key.
When I use the fetch, I get this violation. When I do a direct call to
sql server, I am able to acheive my result.
When I use the fetch I get the following error, I have attached part of
the code after the error.
I was under the impression the dataset is disconnected from CRM server.
Any insights will be helpful

<resultset morerecords='0'
paging-cookie='$1$$account$accountid$1$0$38${AE8FE5C5
-0419-DB11-B5EB-001143EFFB85}$!$account$accountid$1$0$38${AE8FE5C5-0419-DB11-B5E
B-001143EFFB85}$'><result><name>APL Co. Pte.
Ltd.</name><accountid>{AE8FE5C5-041
9-DB11-B5EB-001143EFFB85}</accountid><new_customercode>APLX</new_customercode></
result></resultset>

Unhandled Exception: System.ArgumentException: Cannot remove unique
constraint '
Constraint1'. Remove foreign key constraint 'resultset_result' first.
   at
System.Data.UniqueConstraint.CanBeRemovedFromCollection(ConstraintCollecti
on constraints, Boolean fThrowException)
   at System.Data.ConstraintCollection.Remove(Constraint constraint)
   at System.Data.DataTable.set_PrimaryKey(DataColumn[] value)
   at TritonCRMConsumer.WebServiceConsumer.getCrmCustomerService() in
c:\sandbox
\crm\tritoncrmconsumer\webserviceconsumer.cs:line 414
   at TritonCRMConsumer.WebServiceConsumer.getCustomerWebService() in
c:\sandbox
\crm\tritoncrmconsumer\webserviceconsumer.cs:line 121
   at TritonCRMConsumer.WebServiceConsumer.Main(String[] args) in
c:\sandbox\crm
\tritoncrmconsumer\webserviceconsumer.cs:line 98
Press any key to continue

Code below:

string accountfetch = @"<fetch mapping='logical'>
   <entity name='account'>
      <attribute name = 'name'/>
      <attribute name = 'accountid'/>
		<attribute name = 'new_customercode'/>
		<attribute name = 'deletionstatecode'/>
      <filter type='and'>
         <condition attribute = 'new_customercode' operator='eq'
value='APLX'/>
      </filter>
   </entity>
</fetch>";
	string result1 = service.Fetch(accountfetch);
				Console.WriteLine(result1);
				DataSet resultDS = Util.ConvertXMLToDataSet(result1);
				resultDS.AcceptChanges();
				DataTable crmCustomerDT1 = resultDS.Tables[0];
				DataColumn[] keyCol1 = new DataColumn[1];
				keyCol1[0] = crmCustomerDT1.Columns["new_customercode"];
				crmCustomerDT1.PrimaryKey = keyCol1;
				return resultDS;

0
srini
7/24/2006 9:28:09 PM
crm 35858 articles. 1 followers. Follow

0 Replies
649 Views

Similar Articles

[PageSpeed] 37

Reply:

Similar Artilces:

CRM 4.0 queue issue
Hi, I've run into this in CRM 3.0 (and honestly, I don't know what I did to fix it). But now it's happening in CRM 4.0. I have a queue, and a user with an email address. I want all email that is sent to this user to also appear in the CRM queue. I have it working, it's just that I'm getting everything twice. Once as an email from the original sender, and once from the recipient to the recipient, with the original email as an attachment. For example, kbriscoe@domain.com sends an email to ITSupport@domain.com (Our queue's email address is ITSupport@domain.com). T...

2008 SBS questions... 07-04-10
I am trying to get a 2008 sbs running as efficiently as I can & was wondering about a couple of things. 1) I know it wants to be the DHCP server on a network, but what about for wireless clients? I have a wireless sonicwall TZ-170 for wireless laptops to connect to. They really don't need network access, just internet, so can I leave this running, as long as the addresses it hands out aren't in my same network? 2) Although the bought an SBS, the customer is not & probably won't be running exchange for a while. Can I remove exchange all together? I really see no rea...

CRM 4.0: WebSite deployment problem
CRM 4.0: I cannot deploy my WebSite in the CRM WebSite, below is the error: 'Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthentica­tionProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist. Parameter name: Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticat­ionProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Description: An unhandled exception occurred during the execution of the current web request....

CRM token Limit
Hello, the CRM Token is limited (e.g. 0000 - 9999). What happends when I send a eMail after 9999??? greetings, Stefan It will start at 1 again. Crm just assumes that by the time it roles over the conversations have fininished -- Patrick Verbeeten (MCSD) Lead Developer Aviva IT Web: aviva-it.nl "Stefan" wrote: > Hello, > > the CRM Token is limited (e.g. 0000 - 9999). What happends when I send a > eMail after 9999??? > > greetings, > Stefan ...

infratructure for 2500 users CRM
I am a Microsoft Partener from Romania and I would like to know how many CRM Servers is necesary for 2500 users. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=ae96447d...

Microsoft CRM 3.0 (KB922815) Installation Error
When i try to install Update Rollup 1 for MSCRM 3.0 i get following error. Setup could not find Microsoft CRM 3.0 Server or you have a mismatch between update language and Microsoft CRM language. The installation of this update has stopped. Is this rollup language dependent? I have a swedish installation of MSCRM. Thanks! // Mats ------=_NextPart_0001_11F19277 Content-Type: text/plain Content-Transfer-Encoding: 7bit Yes this rollup is language dependent. You need to install SVE(swedish - sweden) UR1 package. Thanks, Indira Dhingra This posting is provided "AS IS" with no...

CRM 3.0 internal recipients don't recieve mails
Hi everybody... We've installed CRM 3.0, including the Exchange Route Component on an Exchange Server 2003. Inbound and outbound mails, mail tracking and so on are working correctly, but if someone sends an email using the CRM WebInterface or the CRM Outlook Client and uses an email-recipient of our internal domain (e.g. as TO, CC or BCC with adress username@mydomain.com) the mail is not send. An activity that describes that email ist correctly generated by the CRM, but the mail itself is not send to any of the listed recipients, if at least one of them belongs to our domain. Doe...

MS CRM 4.0 Rollup 2 error Data ProductInfo.ExistingLanguage is not available
Recently upgraded to CRM 4.0. Details are as follows - CRM is on premise - 60 Outlook clients - 32 bit server w/ SRS and Exchange router on CRM server - 64 bit DB CRM 4.0 upgrade goes well. Server application of Rollup 2 works fine. Most of my 60 Outlook clients are getting a popup upon running the rollup 2 .EXE: "Data ProductInfo.ExistingLanguage is not available" These are all US English installs (language id 1033). This is not a multi-language install. All users were made "local admins" for the purpose of the client upgrade to 4.0 as well as the rollup install. About...

CRM V3 localized version
Hi Does anyone know any info on v3.0 localized versions (to be available in first quarter 2006)? I need to know if it will be possible to migrate or redeploy from v3 international edition to v3 localized edition? Thanks a lot ...

access 2007 and custom toolbars in earlier version
Is there a way in Access 2007 (Enterprise) to modify a custom toolbar created in say Access 2002? In the help there are only topics about the quick access toolbar. I want to modify the action of a button, but right clicking and choosing customize, like used to be so easy (once you get used to it), is no longer possible. Does that mean no more custom toolbars and no backward compatibilty here? Help would be very welcome as the user friendliness of my user's experience is at stake here. ...

Custom reports 06-13-05
How can I make custom reports in MS CRM? Thanks, M Where can I find Crystal reports? "Mikkhail" wrote: > How can I make custom reports in MS CRM? > Thanks, M "Mikkhail" <Mikkhail@discussions.microsoft.com> wrote in message news:22C1DD57-5461-4924-8CA9-55810497D2D8@microsoft.com... > Where can I find Crystal reports? You need to buy Crystal Reports Developer or Professional Edition v9.2.2. to make custom reports in Microsoft CRM > > "Mikkhail" wrote: > >> How can I make custom reports in MS CRM? >> Thanks, M you may ...

Scribe Migration For SalesLogix to CRM
Does anyone know of any private or public Scribe templates for SalesLogix to CRM? Did you check the Scribe Community Web site? That is where they post their templates. "MD" wrote: > Does anyone know of any private or public Scribe templates for SalesLogix to > CRM? I did. Even spoke with our Rep there and they currently have no templates available. Seems it would be a conflict of interests. I'm not concerned about the main Enitities (Account, Contact, Opportunity, Ticket/Case), which are pretty simple to create. I'm more concerned about the Activities/Histor...

Strange Error (CRM 1.2)
Hi, I have a Virtual PC configuration set up for CRM demos. I have one image that has CRM 1.2 under Windows 2003 server. It is all configured and setup and running fine. I have another image with Windows XP configured. The two images see each other and communicate. From my Windows XP image I can access CRM both via browser and Outlook Client. However, occassionally I can't access the system via Outlook and when I try it via the browser I get a screen coming up with "Sonic Wall" on it asking for a login and password. If I enter in "Administrator" for the login...

Quote for Customer can't find data source #3
I need assistance finding the data source for the quote mail merge in CRM 4.0. I get a error "mail_merge_64494[1].doc is a mail merge document. Word cannot open the data source, ." Here is the process I go through before I get the error: - I open a quote - click on menu bar button "Print Quote for Customer" - select organization mail merge, Quote for customer, and OK - when asked if I want to open or save, I select open - I pick yes, when it asks if it can put data on my document I then get message above. How do I find the datasource? Also is there a way to configure...

IBF for Microsoft CRM now available
Great news to pass along. After a much longer wait than anyone imagined, our IBF solution for Microsoft CRM is now available. It took us a ton of work to get the performance and security of this solution right, but I think you'll find it's well worth the wait! The number of new scenarios enabled and the ability to access Microsoft CRM data from directly inside of your favorite Microsoft Office applications is really compelling. You can download the solution from: http://www.microsoft.com/downloads/details.aspx?FamilyId=332BEFFB-4492-40D7-8CE0-995489909B6A&displaylang=en Join me...

A SQL error has occurred. Going off line with Outlook CRM 4.
I have seen this in multiple workstations. Running the diagnostics, does not report any errors, however removing the temprary data under advenced fixes the problem by deleting the content of the off line database. The problem with this fix is that it may take up to 12 hours for some of our overseas employees to do their initial off line. When is SP1 due? ...

Question about CRM and Great Plains Integration
Can I create invoice when I invoice a contract in CRM and then show the record in the Great Plains ? Thanks in advance ...

How do I enter the character '&' in a custom header?
Can anyone help me with this? Use two of them: && toolman wrote: > > Can anyone help me with this? -- Dave Peterson Try && Mike R. "toolman" wrote: > Can anyone help me with this? That works! Thanks for your help! "Mike R" wrote: > Try && > > Mike R. > > "toolman" wrote: > > > Can anyone help me with this? ...

Check box question 04-23-07
I have a form with a check box used to indicate if a receipt is voided or not. What I'm trying to do is go to a new record after the checkbox is marked. I have the following code in place and it works. Kinda. The problem is that if I then go back and UNCHECK the check box, it sends me to a new record again. Here's the code: Private Sub Check43_AfterUpdate() If Ckeck43 = Yes Then DoCmd.GoToRecord , , acNewRec Thanks for any help! End Sub The following works fine for me. If Me.Check3 = True Then DoCmd.GoToRecord , , acNewRec so try If Ckeck43 = True Then DoCmd.GoToRecor...

Cannot view any form in crm 3.0
We have just installed CRM 3.0 on MS server 2003. I have created an account which has a system administrator role assigned to it. The issue is that when I open CRM web (on the server) when I select account, contact, activities, calendar etc... I get the following error: An error has occured. For more information, contact your system administrator. Now if I open CRM web using an account which has restricted access mode ticked, I don't get any errors, everything opens fine. The problem is that with an restricted access code i can't do much. I have tried assigning different roles ...

Custom Controls 10-16-04
Hi, I would like to create a custom control .ascx and I'd like to konow how can I put it on a standard CRM form (for example Accounts) Thanks in advance Zsolt There is not a supported way to do this on the standard forms themselves. The closest supported method wuld be to add a new Tab on the left of the page via teh ISV.Confi and have that display your control. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------------------------------------- On Sat, 16 Oct 2004 01:19:06 -0700, Zsolt Z�mbik <zombikzs@titanium-consulting.net> wrote: Hi, I would ...

CRM Callout error (ComException) 02-03-04
I followed the example of Microsoft on how to create a Callout COM interface (found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmbscrm1_2/html/mbs_crmPostCalloutsv1d2.asp). But I keep getting the same error. System.Runtime.InteropSevices.ComException: The file name is too long. I used very short names so I don't understand where this error would come from. Anybody got any idea's or encountered this in the past? Regards, RBakkers ...

Data missing from enterprise custom task fields after migrating
We can see the enterprise task fields, but none of the data is displayed in files migrated from Project Server 2003 to 2007. Any ideas? -- michael Michael: What process did you follow for migration? -- Gary L. Chefetz, MVP, MCT, MCTIP Business: http://www.msprojectexperts.com FAQs: http://www.projectserverexperts.com BLOG: http://www.projectserverhelp.com "michaelj" <notreallyme.com> wrote in message news:4BD612D9-D1AD-4FF8-B103-699AB1B54D06@microsoft.com... > We can see the enterprise task fields, but none of the data is displayed > in > fil...

CRM 3.0 SDK Web Services
Hi I am writing a small data migration tool to migrate account and contact data. I have approximate 1500 accounts and 6000 contacts to import to CRM 3.0. I finished the application and ran the data migration, I will able to migrate all of the account records without any problem at all. when I run the contact migration, it can migrate 2800 contact records when it get over 2800, my application throw me the following error message: The underlying connection was closed: Unable to connect to the remote server. I am running CRM 3.0, SQL server and my data migration on the same server. I am wonder w...

Custom total in PivotTable
How do you add a custom total in a PivotTable! For instance: Field1 Field2 Field3 DATA DATA DATA DATA DATA DATA DATA DATA DATA TOTAL (all DATA under Field3 column) I've tried it with grand total but it doesn't work. The only way was to insert new calculated field and grand total, but that gives me two same data columns at the end. Thanks for helping, Boris ...