Help need for .net assembly in Workflow manager

A simple code (given below) creates a task  thro' .net assembly . I invoked 
this code via console application & found that it is running fine. It is 
creating task in CRM successfully. 

The problem is : when I included it in Work flow manager, it displays that 
"task completed" in workflow monitor but it is not creating a task in CRM . 

using System;
using System.IO;
using TaskCreation.CRMWeb;

namespace TaskCreation
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	public class Class1
	{
		public Class1()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		
		public void CreateTask()
		{

				//Setup crmservice
				CrmService service=new CrmService();
				service.Credentials=System.Net.CredentialCache.DefaultCredentials;
							

				// create a task 
				task t1 = new task();
				// Define the subject of the task
				t1.subject = "Test Report";

                                                                
                                Guid tid=new Guid();
				tid=service.Create(t1);
               }


}

}
0
Utf
9/28/2007 11:49:00 AM
crm 35858 articles. 1 followers. Follow

3 Replies
432 Views

Similar Articles

[PageSpeed] 56

Try this one

//

using System;
using System.IO;
using TaskCreation.CRMWeb;


namespace TaskCreation
{
        /// <summary>
        /// Summary description for Class1.
        /// </summary>
        public class Class1
        {


                public void CreateTask()
                {


                                //Setup crmservice
                                CrmService service=new CrmService();
 
service.Credentials=System.Net.CredentialCache.DefaultCredentials;


                                // create a task
                                task t1 = new task();
                                // Define the subject of the task
                                t1.subject = "Test Report";


                                Guid tid=new Guid();
                                tid=service.Create(t1);
               }


}


0
Aamir
9/28/2007 12:16:41 PM
Are you sure the task isn't created - it will be owned by the SYSTEM user, 
not yuor user account ?

Otherwise you'll probably have to setup debugging and step through the code
-- 
David Jennaway - Microsoft Dynamics CRM MVP
Web: http://www.excitation.co.uk



"krithi" wrote:

> A simple code (given below) creates a task  thro' .net assembly . I invoked 
> this code via console application & found that it is running fine. It is 
> creating task in CRM successfully. 
> 
> The problem is : when I included it in Work flow manager, it displays that 
> "task completed" in workflow monitor but it is not creating a task in CRM . 
> 
> using System;
> using System.IO;
> using TaskCreation.CRMWeb;
> 
> namespace TaskCreation
> {
> 	/// <summary>
> 	/// Summary description for Class1.
> 	/// </summary>
> 	public class Class1
> 	{
> 		public Class1()
> 		{
> 			//
> 			// TODO: Add constructor logic here
> 			//
> 		}
> 
> 		
> 		public void CreateTask()
> 		{
> 
> 				//Setup crmservice
> 				CrmService service=new CrmService();
> 				service.Credentials=System.Net.CredentialCache.DefaultCredentials;
> 							
> 
> 				// create a task 
> 				task t1 = new task();
> 				// Define the subject of the task
> 				t1.subject = "Test Report";
> 
>                                                                 
>                                 Guid tid=new Guid();
> 				tid=service.Create(t1);
>                }
> 
> 
> }
> 
> }
0
Utf
9/28/2007 12:18:00 PM

Thanks yaar !   I found some problem in workflow.config file . 


"Aamir" wrote:

> Try this one
> 
> //
> 
> using System;
> using System.IO;
> using TaskCreation.CRMWeb;
> 
> 
> namespace TaskCreation
> {
>         /// <summary>
>         /// Summary description for Class1.
>         /// </summary>
>         public class Class1
>         {
> 
> 
>                 public void CreateTask()
>                 {
> 
> 
>                                 //Setup crmservice
>                                 CrmService service=new CrmService();
>  
> service.Credentials=System.Net.CredentialCache.DefaultCredentials;
> 
> 
>                                 // create a task
>                                 task t1 = new task();
>                                 // Define the subject of the task
>                                 t1.subject = "Test Report";
> 
> 
>                                 Guid tid=new Guid();
>                                 tid=service.Create(t1);
>                }
> 
> 
> }
> 
> 
> 
0
Utf
10/9/2007 4:55:06 AM
Reply:

Similar Artilces:

Outlook w/Biz Content Manager
Business Content Manager has worked superbly until this morning when incoming emails now appear both in the Inbox, and in the Business History and one of the Accounts in Business Content Manager. I can find no reference to this anywhere. Any ideas on how to fix? Thanks. BCM sometimes has what's known as a "forms cache" problem. Clearing the cache usually fixes it. Choose Tools | Options | Other | Advanced Options | Custom Forms, then click Manage Forms, then Clear Cache. If simply clearing the cache doesn't fix the issue, try the other steps detailed at http://supp...

Wanted vb.net trainer -hyderabad location
Hi friends!! Greetings!! We are in need of a vb.net trainer urgently for hyderabad location..pls forward ur resumes to meghanaitsol@gmail.com With regards, Meghana IT Solutions "Meghana" <meghanaitsol@gmail.com> wrote in message news:83702ee7-4dd6-4d76-9aaa-b879c186c7f2@t9g2000prh.googlegroups.com... > We are in need of a vb.net trainer And the best place to find one, in your considered opinion, is in a peer-to-peer newsgroup dedicated to C#...? Sounds like a VB.NET trainer is the least of your requirements... -- Mark Rae ASP.NET MVP http...

Need invisible/shaded/highlighted cell
I'm thinking what I would like to do can *probably* be done in VBA, but I'd like to use the formula in the cell. If it can be done. I have three columns: DOW DATE BILL DTE --- -------- -------- Wed 02/01/06 02/03/06 Thu 02/02/06 02/06/06 Fri 02/03/06 02/07/06 Sat 02/04/06 02/06/06 Sun 02/05/06 02/07/06 Mon 02/06/06 02/08/06 Tue 02/07/06 02/09/06 Wed 02/08/06 02/10/06 . . . . The date col contains a formula to add 1 to the cell above. The day of week col uses the date from the date column. And the bill date col adds 4 days to the date col if it falls on a "Thu...

Refresh Form
I have an interesting problem (maybe its not so interesting to the gurus who frequent this board :) ). Here is the back ground information: I have a form that contains tab controls and several sub forms. The main form contains a control that dictates what data is displayed on one of my sub forms via parameters in the query (data source). So, I have added some code to the "after update" event that looks like this: --------------------- me.form.refresh me.form.requery --------------------- I have also tried: --------------------- Me.[sub_form_control_name].Requery -----------...

Can someone help with this error
I am randomly getting an access error in my application and I am trying to find it. The error seems to occur when allocating a buffer in the CString code. Does anyone know if the dump below is pointing to anything specific? It seems like the error is occuring when 'text' is be allocated but I don't know why. // this is the function call in the ArchExists(..) module where the CString is allocated (parm1). CComSetup::ExtractParams( text, &type1, &desc1, &name1, &id1 ); // This is the declaration of the function void CComSetup::ExtractParams( CString src, CStrin...

please help.. highly important...
i have a excel .CSV file that Gmail generated for me with my contacts in.. what i want to do is function that go over all the contacts emails one by one and deletes all missformated addresses that cannot be use to send email for them.. somthing like : if (the cell's text is not an valid email address) { delete the cell ; } to be honest i dont know much about excel so i need somthing from scratch like how to put the function in the file and that.. thank you all very much.. Also posted in public.excel.misc "yakir" <yakir@discussions.microsof...

I can not see all contents in one cell. Help me pls!
Please help me! By default when I write some text in cell and the text is longer then cell's width, I can not see his contents in next cells. But in one excel file when I sellect all cells in worksheet and then draging them it can no longer seen all contents in one cell. What I should to do? Thank you in advance! If you have wraptext turned on (format|cells|alignment tab), then the cell will expand its rowheight to show you all the data. (unless you use merged cells or have adjusted the rowheight manually). If you have wraptext turned off, then the text will overflow to the cell to ...

a little help with finding and associating cells
ok so here is my dilemma, I need a formula that will look at a cell value on one work sheet, check for the same value on another work sheet in a defined column, and insert a coresponding value from another column...... is that even remotely possible??? any help would be greatly appreciated.... -- rcarrollct ------------------------------------------------------------------------ rcarrollct's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24931 View this thread: http://www.excelforum.com/showthread.php?threadid=384671 It's called VLOOKUP. http://www.offi...

need help... Getting a error when I add a xml schema include location xsd file
Hi, I am trying to add the following line to my xml schema xsd file <xsd:include schemaLocation="../../../Common/datatypes.xsd"/> Here is my code XmlSchemaInclude include = new XmlSchemaInclude(); include.SchemaLocation = "../../../Common/datatypes.xsd"; schema.Items.Add(include); when I print out the schema, it crashes StreamWriter sw = new StreamWriter(@strFormName+".xsd", false, Encoding.UTF8); schema.Write(sw); sw.Close(); Any help is greatly appreciated, Thanks ...

Please help me: Refresh pivot table using another source file.
My supervisor put an interactive spreadsheet (or pivot table) on the web. Now he wants me to make changes to the spreadsheet so that when you click "Refresh" on the website, this spreadsheet gets new data from me rather than from my supervisor. How do I do this? Thanks for your help. ...

Backup help
I'm planning to make a backup routine for an application. My idea is as follows: 1. Make a backup of the whole application once a day. 2. Keep those backups saved for 3 months. 3. When the fourth month starts, delete all backups from the first month, except the one from the first day of that month. 4. When the fourth year starts, delete all backups from the first year. Is that a good strategy? Thanks in advance, John That is good except that you are not really keeping three months/years of backups because on the first day of the fourth month/year, you are deleting the first m...

need to retrieve recently deleted email in live mail
How can I retrieve mail that was accidentally deleted before it could be read? Open the "Deleted Items" folder under the affected account. -- Dave N. MS-MVP (Mail) Windows 7 Ultimate http://download.live.com/wlmail "manspirit1" <manspirit1@discussions.microsoft.com> wrote in message news:EA3249CE-C52E-4F47-AD4A-F633E1A06D1A@microsoft.com... > How can I retrieve mail that was accidentally deleted before it could be > read? If it is(was) a Hotmail type account(Hotmail.com, Live.com, Msn.com) using Pop3 and the message is not in your ...

Exchange design
Please help with following scenario Set up: Company has a nation-wide Sendmail server that only does POP3 for every branch office in the nation, domain is us.company.com. One branch office decides to deploy SBS/Exchange internally for that office. Problem: internal domain is company.local, recipient policy has us.company.com for mail delivery. Everytime an employee from that office tries to email someone else who is outside of that office that piece of mail gets dropped (because AD user does not exist and because Exchange now handles us.company.com) How would I be able to make it so th...

Updating a Bank of America Account Help
This is my first time using MS Money 2005 Premium, and I need asisstance on how to update my Bank of America account. When I went through the wizard for setting up the bank account I entered everything it requested everything set up right I can see both my savings and checking account, but the problem is updating. When I try to update it, it doesn't do anything. Does MS Money even support automatic update from Bank of America? Please Help Thanks in Advance I think it depends on how Bank of America works their updates. I bank with Wells Fargo and the auto update does not work either. I...

Need to clear OPS drivers
Is there a way to find and remove ALL OPOS drivers - especially the ones apparently installed by pixies ( hardware vendors?) without any documentation? I just had an "experience" setting up Star TSP100 and cash drawers on RMS 1.3. Although I finally got everyting resolved (the last problem turned out to be a bad cable between the printer and the cash drawer), the headaches along the way were excaberated because I could not use the test software provided by Star Micronics. It claimed that another control object was already registered. The problem was that I had not installed an...

Need To Add VBA Tools Like A Date Picker
I have written a couple of VBA projects for my company. Most of the computers run them all fine but some do not. About half of the computers are running Windows XP Pro w/ Office XP Small Buisness and the other Half are running on Windows 2000 Pro w/ Office 2000 Small Business. My problem is that some of the office 2000 computers do not have Date Pickers in there VBA so they get errors when they try and run the programs. It says something like error: project cannot be found. I want to know where I can update my VBA tools from. Any help would be greatly apprecitated. Thanks, Mark ...

IF Statement equalling multiple words. Please Help
I want to say if cell A1 = "word1" or "word2" or "word3", then "". Otherwise do this. I know how to make check if it = 1 item, but how do you make it check 3 or four things without using multiple IF statements? Thanks Phil Use and If(or(A1="word1",A1="word2",A1="word3"),then"",else) That should work for you, Cody "Phillip Vong" wrote: > I want to say if cell A1 = "word1" or "word2" or "word3", then "". > Otherwise do this. > > I know how t...

Beginner needs help
hello together, i spent several hours on solving the following problem: all i want is a = application with a single document horizontally divided by a splitter. = within the above view(?) i want to be able to scribble (like in the = appropriate tutorial of microsoft) while the bottom view(???) should be = able to receive and display text. additionally i want to save and print = everything together (common document?). even though i read many = tutorials about splitters, i am far from solving this task. is there = anybody who can tell me something about the basic structure i have to = use - or ...

Desperate Help Required Please!
Hello There :-) Setup is :- Microsoft Small Business Server 2003 Premium running Exchange. Machine is setup as a Domian Controller (only one on the network) and is named hfs-info-dc1, it is also the DNS server for the company using hfs-info.local We have a POP3 email server hosted by another company and it uses the following:- user@hfs-info.com All internal emails and external emails appear on the face of it to function correctly apart from..... Any of the users@hfs-info.com :/ If I try to send the an email to these users external to the company accessing their email using the PO...

Dexterity Components & GPConnNet.dll
Greetings & thanks in advance for taking a moment to review my issue. I am attempting to deploy SP3 for GP 10 on a number of my workstations. We don't allow users to operate as local administrators, so the standard process to push updates via MSP packages doesn't cut it for us. My typical process is to build the standard MSI installation image using the tools on the GP installation DVD, deploy that package via Group Policy as a base installation, then use a few additional custom MSI packages for little tweaks (copy an updated dictionary file, put shortcuts where my users wa...

Web Query Help
Hello, I'm having a difficult time with Web Queries. I have set up a web query that automatically updates every 10 minutes. I would like to save the data from each of the updates in a separate sheet. So far I have had no luck. Can anyone point me in the correct direction? Thanks in advance. Peter How are you currently refreshing every 10 minutes? -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS www.nickhodge.co.uk "PeterJCollins" <ntsmith@gmail.com> wrote in message news:1167223369.636943.7160@a3g2000cwd.googlegro...

Excel Waiting List Help
I could use some help with an Excel Waiting List I am trying to create. My first column A is labeled Date and I formatted it as date. I have typed in 6/1/07 in A-1; I would like it when I type in in A-2 “6” the 1/07 is filled in already for me. The reason, this is a log of calls and there may be more than one entry call for that date. (Lazy typer) Also need help with column C. If in C-1 I type in Smith as the last name I would like it to type in for me “_mith” in C-6 if I type in S. Reason, this would tell me that person already called that day or in the past. Sounds like it might not...

Money 2005 Portfilio Manager "Screen Flicker"
Money 2005 has the annoying habit of updating the Portfolio display a second or two after returning from the Price History Graph display. I have a relatively fast computer 3.2 GHz Pentium, 1 Gig of dual channel memory etc., etc. Is there something I can change in the Settings that will stop Money from doing whatever it is doing when switching displays? I have watched the cpu utilization and it peaks at 32% during this delay period. I have been using Money since day one and the number of active and inactive investments has grown to 100+. Could that be part of the "problem"...

Learning CRM
Hi, I really need your advice. I am very experienced in .NET, C#, Winforms, SQL, IIS, ASP.NET as well as VSTO and MS Office. Now, I am interested in learning the ins and outs of Microsoft's CRM product from a developer / integration perspective and need to chart an "education" path. Please correct me if I am missing anything but the areas I would need to know are: - Setup, Installation and Deployment; - Detailed CRM feature usage and configuration; - CRM native customization capabilities; - CRM customization extensions (.NET, add-ons, plug-ins, etc....) Though I am p...

WorkFlow and Time
Question is will this work. Just started playing with the time assebly in 3.0. Attempting to notify someone 12 months before a date field. Example: Date field is populated as 12/1/2007 send an email on 12/1/2006. Will an If then work with the subtract time function? Will just setting an action to take place using the subtract time function work? Thoughts? ...