SetStateContractResponse Error

Hi

I keep getting the following error when trying to update a Contract status 
from Draft to Invoiced - "0x80040217 The specified object was not found". 
The creation of the contract is successful and I get the contractid. But 
when I execute the code below, I get the error.

contract policy = new contract();

policy.contractid = new Key();

policy.contractid.Value = policyId;

SetStateContractRequest policyReq = new SetStateContractRequest();

policyReq.ContractState = ContractState.Invoiced;

policyReq.ContractStatus = -1;

SetStateContractResponse policyRes = 
(SetStateContractResponse)crmService.Execute(policyReq);

The contractid is properly displayed on CRM when I check the contract 
properties.
Please help

TIA
walterd 


0
walterd
2/16/2007 12:08:39 PM
crm 35858 articles. 1 followers. Follow

4 Replies
622 Views

Similar Articles

[PageSpeed] 32

You're missing

policyReq.EntityId = policyId;

-- 
Michael H�hne, Microsoft Dynamics CRM MVP

Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup

----------------------------------------------------------

"walterd" <walterd@ananzi.co.za> schrieb im Newsbeitrag 
news:eD%23PDLcUHHA.5016@TK2MSFTNGP05.phx.gbl...
> Hi
>
> I keep getting the following error when trying to update a Contract status 
> from Draft to Invoiced - "0x80040217 The specified object was not found". 
> The creation of the contract is successful and I get the contractid. But 
> when I execute the code below, I get the error.
>
> contract policy = new contract();
>
> policy.contractid = new Key();
>
> policy.contractid.Value = policyId;
>
> SetStateContractRequest policyReq = new SetStateContractRequest();
>
> policyReq.ContractState = ContractState.Invoiced;
>
> policyReq.ContractStatus = -1;
>
> SetStateContractResponse policyRes = 
> (SetStateContractResponse)crmService.Execute(policyReq);
>
> The contractid is properly displayed on CRM when I check the contract 
> properties.
> Please help
>
> TIA
> walterd
> 


0
Michael
2/16/2007 10:47:12 PM
Hi

I made the change as you suggested, but now I get a different error - "The 
service address of the contract is invalid."
Do you know what could be the problem?

TIA
walterd

"Michael H�hne" <michael.hoehne@nospam.nospam> wrote in message 
news:ekJeGwhUHHA.1016@TK2MSFTNGP04.phx.gbl...
> You're missing
>
> policyReq.EntityId = policyId;
>
> -- 
> Michael H�hne, Microsoft Dynamics CRM MVP
>
> Web: http://www.stunnware.com/crm2
> Feed: http://www.stunnware.com/crm2/atom.aspx
> Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup
>
> ----------------------------------------------------------
>
> "walterd" <walterd@ananzi.co.za> schrieb im Newsbeitrag 
> news:eD%23PDLcUHHA.5016@TK2MSFTNGP05.phx.gbl...
>> Hi
>>
>> I keep getting the following error when trying to update a Contract 
>> status from Draft to Invoiced - "0x80040217 The specified object was not 
>> found". The creation of the contract is successful and I get the 
>> contractid. But when I execute the code below, I get the error.
>>
>> contract policy = new contract();
>>
>> policy.contractid = new Key();
>>
>> policy.contractid.Value = policyId;
>>
>> SetStateContractRequest policyReq = new SetStateContractRequest();
>>
>> policyReq.ContractState = ContractState.Invoiced;
>>
>> policyReq.ContractStatus = -1;
>>
>> SetStateContractResponse policyRes = 
>> (SetStateContractResponse)crmService.Execute(policyReq);
>>
>> The contractid is properly displayed on CRM when I check the contract 
>> properties.
>> Please help
>>
>> TIA
>> walterd
>>
>
> 


0
walterd
2/19/2007 10:42:48 AM
Did you specify an address in the "Contract Address" and "Bill to Address" 
fields of the contract? You shouldn't be able to invoice a contract in the 
web client as well if one of them is missing.

-- 
Michael H�hne, Microsoft Dynamics CRM MVP

Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup

----------------------------------------------------------

"walterd" <walterd@ananzi.co.za> schrieb im Newsbeitrag 
news:O0CDCJBVHHA.3316@TK2MSFTNGP02.phx.gbl...
> Hi
>
> I made the change as you suggested, but now I get a different error - "The 
> service address of the contract is invalid."
> Do you know what could be the problem?
>
> TIA
> walterd
>
> "Michael H�hne" <michael.hoehne@nospam.nospam> wrote in message 
> news:ekJeGwhUHHA.1016@TK2MSFTNGP04.phx.gbl...
>> You're missing
>>
>> policyReq.EntityId = policyId;
>>
>> -- 
>> Michael H�hne, Microsoft Dynamics CRM MVP
>>
>> Web: http://www.stunnware.com/crm2
>> Feed: http://www.stunnware.com/crm2/atom.aspx
>> Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup
>>
>> ----------------------------------------------------------
>>
>> "walterd" <walterd@ananzi.co.za> schrieb im Newsbeitrag 
>> news:eD%23PDLcUHHA.5016@TK2MSFTNGP05.phx.gbl...
>>> Hi
>>>
>>> I keep getting the following error when trying to update a Contract 
>>> status from Draft to Invoiced - "0x80040217 The specified object was not 
>>> found". The creation of the contract is successful and I get the 
>>> contractid. But when I execute the code below, I get the error.
>>>
>>> contract policy = new contract();
>>>
>>> policy.contractid = new Key();
>>>
>>> policy.contractid.Value = policyId;
>>>
>>> SetStateContractRequest policyReq = new SetStateContractRequest();
>>>
>>> policyReq.ContractState = ContractState.Invoiced;
>>>
>>> policyReq.ContractStatus = -1;
>>>
>>> SetStateContractResponse policyRes = 
>>> (SetStateContractResponse)crmService.Execute(policyReq);
>>>
>>> The contractid is properly displayed on CRM when I check the contract 
>>> properties.
>>> Please help
>>>
>>> TIA
>>> walterd
>>>
>>
>>
>
>
> 


0
Michael
2/19/2007 9:20:22 PM
Hi

Thanks Michael for the info. I tried Invoicing the contract manually and it 
gave me all the exceptions. That portion is now working fine.

I want to try and Expire a contract but have not been successful. I don't 
even know how to do it manually. Can you be so kind as to shed some light?

Once again, thank you
walterd


"Michael H�hne" <michael.hoehne@nospam.nospam> wrote in message 
news:eT35UtGVHHA.4632@TK2MSFTNGP04.phx.gbl...
> Did you specify an address in the "Contract Address" and "Bill to Address" 
> fields of the contract? You shouldn't be able to invoice a contract in the 
> web client as well if one of them is missing.
>
> -- 
> Michael H�hne, Microsoft Dynamics CRM MVP
>
> Web: http://www.stunnware.com/crm2
> Feed: http://www.stunnware.com/crm2/atom.aspx
> Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup
>
> ----------------------------------------------------------
>
> "walterd" <walterd@ananzi.co.za> schrieb im Newsbeitrag 
> news:O0CDCJBVHHA.3316@TK2MSFTNGP02.phx.gbl...
>> Hi
>>
>> I made the change as you suggested, but now I get a different error - 
>> "The service address of the contract is invalid."
>> Do you know what could be the problem?
>>
>> TIA
>> walterd
>>
>> "Michael H�hne" <michael.hoehne@nospam.nospam> wrote in message 
>> news:ekJeGwhUHHA.1016@TK2MSFTNGP04.phx.gbl...
>>> You're missing
>>>
>>> policyReq.EntityId = policyId;
>>>
>>> -- 
>>> Michael H�hne, Microsoft Dynamics CRM MVP
>>>
>>> Web: http://www.stunnware.com/crm2
>>> Feed: http://www.stunnware.com/crm2/atom.aspx
>>> Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup
>>>
>>> ----------------------------------------------------------
>>>
>>> "walterd" <walterd@ananzi.co.za> schrieb im Newsbeitrag 
>>> news:eD%23PDLcUHHA.5016@TK2MSFTNGP05.phx.gbl...
>>>> Hi
>>>>
>>>> I keep getting the following error when trying to update a Contract 
>>>> status from Draft to Invoiced - "0x80040217 The specified object was 
>>>> not found". The creation of the contract is successful and I get the 
>>>> contractid. But when I execute the code below, I get the error.
>>>>
>>>> contract policy = new contract();
>>>>
>>>> policy.contractid = new Key();
>>>>
>>>> policy.contractid.Value = policyId;
>>>>
>>>> SetStateContractRequest policyReq = new SetStateContractRequest();
>>>>
>>>> policyReq.ContractState = ContractState.Invoiced;
>>>>
>>>> policyReq.ContractStatus = -1;
>>>>
>>>> SetStateContractResponse policyRes = 
>>>> (SetStateContractResponse)crmService.Execute(policyReq);
>>>>
>>>> The contractid is properly displayed on CRM when I check the contract 
>>>> properties.
>>>> Please help
>>>>
>>>> TIA
>>>> walterd
>>>>
>>>
>>>
>>
>>
>>
>
> 


0
walterd
2/20/2007 2:52:05 PM
Reply:

Similar Artilces:

Runtime C++ Error in Outlook
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have Outlook 2002 and can't keep it open. When it opens I get a runtime C++ error/abnormal termination error. I have tried repairing, reinstalling and a remove/install and nothing works. I am running Window 2000. HELP!! Thanks -----BEGIN PGP SIGNATURE----- Version: PGP 8.0 - not licensed for commercial use: www.pgp.com iQA/AwUBQL5hX+koPZAZfLgsEQIlfgCfbV+d1i4VSkXQ1yhasNCQFN5MvXsAoLFZ mYFcE1ay6j0t3oulf6ZlianB =Cu9O -----END PGP SIGNATURE----- Lady Veteran ----------------------------------- "I rode a tank and held a general's...

exmerge errors #6
Greetings, I'm trying to migrate email boxes from exchange 5.5 to new SBS 2003 with Exchange 2003. Exmerge errors are LDAP related. I've been through KB articles and have changed the LDAP port on my exchange 5.5 server. It does not help. Exchange 5.5 event log indicates that LDAP server is running on port 421 and a second event log indicates that LDAP SSL server is running on 391. If I run exmerge using port 421 I get error 80005000 - LDAP://servername:421. If I run exmerge using port 391 then I get error 8007203a LDAP://servername:391/rootdse. I have followed KB article...

Calendar Export Error
When exporting calendar information, the following error keeps popping up: An error occurred while importing or exporting and the import/export was terminated. MAPI error 0X80004002 was reported. Please try to import/export again later. The user is trying to export the calendar to a comma separtated value (windows) file. So far, I have tried the following troubleshooting steps: Export just to a pst file (no error) Export to a pst file and then import to a new mailbox (error) Export a different calendar using same procedure (no error) Export to a pst file, attach...

Error 80242016 and 800F0816 and 800706BE
What are the steps for each one? Thanks -- Kristen Rios How to ask a question http://support.microsoft.com/kb/555375 MowGreen ================ *-343-* FDNY Never Forgotten ================ banthecheck.com "Security updates should *never* have *non-security content* prechecked ...

Outlook 2002 and Error message 0x800ccc0f
Hi, Outlook 2002 was working great. But now I get the message "Error 0x8000ccc0f: Connection to the Server Was Interruped". I searched the MS "Knowledge Base Article" and it said to manually add the POP sever settings to correct the problem. I deleted my old account and then manually entered the information, but this didn't fix the problem. Does anybody know of another way to fix this problem? Thanks >-----Original Message----- >Hi, > >Outlook 2002 was working great. But now I get the >message "Error 0x8000ccc0f: Connection to the Server ...

Error Help
"Message delivery to the remote domain 'mydomain.com' failed for the following reason: Unable to bind to the destination server in DNS' My DNS and Exchange Servers are is NT 4.0 Ther error is from 2000 boxes. Any help? sounds like DNS can't resolve mydomain.com. If that's a local domain, check with your DNS admin, or if you are the DNS admin, track down the resolution issue, focus on the mx records for the exchange server in the domain. If it's not a local domain, check the internet (dnsstuff.com or the like) for resolution and if it fails contact them dir...

Access to Microsoft forums and error 13
I wanted to get a wider audience for the error 13 problem that may have been fixed with the latest download. I signed up for the Microsoft's green button, received a confirmation but can't log on. I probably have to wait for someone to come in on Monday. Meanwhile, could someone use the green button media center forum to confirm that the problem was introduced with the previous to last fix and the latest fix solved the problem. I can't verify the fix because I switched to cable and the problem is unique to dialup (switched lines). There's no information with ...

Can't add columns error
I'm in a spreadsheet that has columns up to "AH". Everything to th right of AH is gray'd out and Excel won't let me add any columns. Ca anyone help -- johnu ----------------------------------------------------------------------- johnuw's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1661 View this thread: http://www.excelforum.com/showthread.php?threadid=31472 Hi.. Unsure about this fix�but still.. The col. may have been hidden.. 1. Press <Ctrl + A> 2. Press < Shift Ctrl + ( > & Shift + Ctrl + ) > if it doesn'...

credit center application error
Attempted log into Credit Center produces small box "application error". Does not indicate which module. Used to work fine. Login from www.experian.com works fine. Reinstalled. Norton AN OFF, no joy. Same result using sample.mny. Ideas? I had the same problem. Tech help said to download new info as if for the first time. Looks like they will charge you for this but dont worry. Its free if your Money covers it. >-----Original Message----- >Attempted log into Credit Center produces small >box "application error". Does not indicate which module. >U...

Runtime Error
unable to open my saved word documents Runtime Error appears each time I attempt to open word documents, computer is running very slow and will not shut down not showing any virus issues. Program:C: \PROGRA~1\micros~4\Office10\winword.exe -- Thank you for your time, San Diego Beach Girl San Diego Beach Girl wrote: > unable to open my saved word documents > Runtime Error appears each time I attempt to open word documents, computer > is running very slow and will not shut down not showing any virus issues. > > Program:C: \PROGRA~1\micros~4\Office10\winword...

Error
I tried to change my account password and now I can't get my mail. Can anyone help. We can't help you with changing your password. Contact your mail service provider. --=20 Gary VanderMolen, Microsoft MVP (Mail) Microsoft MVP program: http://mvp.support.microsoft.com "Leonard" <Leonard@discussions.microsoft.com> wrote in message = news:321FF1DD-0F1B-4389-B09B-8B343A10275A@microsoft.com... >I tried to change my account password and now I can't get my mail. > Can anyone help. > "Leonard" <Leonard@discussions.microsoft.com&...

Error installing CRM 3.0 on SBS 2003 R2
I get the following error when trying to install CRM 3.0 on SBS 2003 R2. I have been unable to find any information on this. Any help would be appreciated. [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection. ...

Synchronization Error
Hi folks, I have several remote users, and I set up their computers as domain members by default, and by default, the "my documents" folder is redirected to a network share. When I give the laptop to the user, they are getting a sync error when they log in. We have VPN software, but they don't initiate that until the computer is logged in and running, and they get the sync error first. Is there a way to make that sync error go away, or sync after the VPN is established? Mike This may help as it explains how Group Policies (like Folder Redirection) are pro...

Restricted Access Error with Microsoft Office 2004 SP2 and Mac OS 10.3.x
We updated to Microsoft Office 2004 SP2 and everything runs fine. However, on the 20 or so restricted access ID's that we had previously setup now encounter the infamous http://support.microsoft.com/?scid=kb;en-us;908466 error: When you start Microsoft Excel 2004 for Mac, Microsoft PowerPoint 2004 for Mac, or Microsoft Word 2004 for Mac, you receive the following error message: "An unexpected error occurred while trying to load the Microsoft Framework library." This only happens with a restricted account. We have uninstalled, cleared the startup items, startup addi...

error in FRx
Hi, I am receiving the following error while generating a report in Frx - "error loading columns for printing". I am using a reporting tree with 11 reporting units and this error occurs only for one of the reporting unit. Thanks, Sudarshan ...

error in import outlook 2003 #2
Dear Sir or Madam Please be inform i could not import my *.pst file in my outlook 2003. however, i tired your way but it was not useful for me. and i recived below massage again: the file G:\Backup\Outlook.pst is not a personal floders file. I would appricated if you could help me in this matter. I look forward to hearing from ou best regards. Sam <moghadasnian@googlemail.com> wrote in message news:1179774273.809742.283490@y2g2000prf.googlegroups.com... > Dear Sir or Madam > > Please be inform i could not import my *.pst file in my outlook 2003. > however, i tired your wa...

error msg
The connection to the server has failed. Account: 'pop.gmail.com (1)', Server: 'pop.gmail.com', Protocol: POP3, Port: 110, Secure(SSL): No, Socket Error: 10060, Error Number: 0x800CCC0E How do I fix the setup so I don't get this. tks. Gmail would like you to use the settings they specify. See http://mail.google.com/support/bin/answer.py?answer=86383 Gary VanderMolen, Microsoft MVP (Mail) "kbalme60" wrote in message news:5E4392EB-1B1C-4604-ACA8-8900DC1F3354@microsoft.com... The connection to the server has failed. Account: 'pop.gmail.co...

Errors Tracking Emails in CRM 3.0
Hi, Just wondering if anybody else has experienced issues tracking emails in CRM using Terminal Services? We have CRM installed as both Laptop Clients for our laptop users and TS Client for our terminal server users. All running V3C. Users that have laptop clients are able to track emails in CRM with out an issue, however when a TS client clicks the tracking button 99% of the time it returns the following error; --------------------------- Microsoft CRM --------------------------- An error occurred promoting this item to Microsoft CRM. --------------------------- OK -------------------...

SQL2008 connection error
Hi, I just migrated SSRS2005 tp SSRS2008. My question is, 1. I can't connect to SQL 2008 at all, I tried ODBC and SSRS reports. TCPIP is enabled. 2. Now the SSRS 2008 url is http://servername /prodreports, How do I change the URL to reports.company.com Thnaks, Hi, can you try outside of SSRS (via ODDB Admin) if you are able to connect to the ODBC datasource. If you are using SQL 2008 I would recommend the Sql Server Managed Provider instead of ODBC. You can change the url reservations in the RS Config Tool (RSCONFIGTOOL.EXE) Best Regards Klaus Sobel &...

Runtime Error -2147217900
Hi all ~ Everytime we Z out our second register, non-database system, we get the following error: "runtime error -2147217900 DBNETLIB CONNECTION OPEN SQL SERVER DOES NOT EXIST OR ACCESS DENIED" Any idea what's causing this? It seems to happend when the tables try to syncronize the tables. Jerry If it only happens when RMS is trying to syncrhonize with your offline database, then it just means that it can not connect to the database(offline version) on second register. You would have to check in Administrator program that you set up your offline database correctly; pass...

Outlook error message
Everytime I try to start Outlook (and I.E.) I get this error message "Microsoft Outlook (or I.E.) has encountered a problem and needs to close. We are sorry for the inconvenience." Then It goes on to tell me to Send or decline sending the message to the Microsoft. And attempts to restart Outlook. Whether I send or refuse to send the message my Outlook never starts up, and I go through this cycle until I refuse to restart the system. I have un-installed the product and re-installed it -- but I still get the same error. I have a paid for my version, and I have registered it on the...

Difficulty seeing error
If I try to validate this xml... <?xml version="1.0" encoding="utf-8" ?> <a:FuncalcParameters xmlns:a="http://www.somewhere.fun.com/Funcalc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.somewhere.fun.com/Funcalc http://localhost/FuncalcService/FuncalcParameters.xsd"> <TransId>D-288</TransId> <CalcType>CalculateARM</CalcType> <SR>5</SR> <RRT></RRT> <RRQ></RRQ> <B_In...

ActiveSheet.Paste error
I have a consolidation routine that will, if the user chooses, consolidate the output of all the sheets in our generated report onto one sheet by appending them one after the other with the ActiveSheet.Paste method. It has been working fine with no problems until one customer generated a LOT of reports which means a lot of worksheets in the book and a lot of calls to cut and paste them all onto one sheet. Through trial and error I found that my machine can handle 90 reports (90 worksheets pasted into one sheet via a loop) before the error occurs. The customer was generating 92 reports (but I d...

Error on opening
When I attempt to open "Outlook" I always get the following error message: OUTLOOK caused an invalid page fault in module <unknown> at 0000:13722a04. Registers: EAX=00110162 CS=015f EIP=13722a04 EFLGS=00010246 EBX=00000000 SS=0167 ESP=0056f114 EBP=0056f338 ECX=0056f340 DS=0167 ESI=01a1105c FS=3797 EDX=0056f364 ES=0167 EDI=01a1093c GS=0000 Bytes at CS:EIP: Stack dump: 3a45beaa 01a1105c 0056f340 01a1093c 0069112c 00691cf0 81400000 04572d96 01440000 01672da7 16a71624 5270814e 076e1787 16a7077a 815c3797 17874e04 I cannot open 'outlook' to retrieve my id number. Any s...

SetStateContractResponse Error
Hi I keep getting the following error when trying to update a Contract status from Draft to Invoiced - "0x80040217 The specified object was not found". The creation of the contract is successful and I get the contractid. But when I execute the code below, I get the error. contract policy = new contract(); policy.contractid = new Key(); policy.contractid.Value = policyId; SetStateContractRequest policyReq = new SetStateContractRequest(); policyReq.ContractState = ContractState.Invoiced; policyReq.ContractStatus = -1; SetStateContractResponse policyRes = (SetStateContractRe...