SDK question - creating campaign responses

I've done a bunch of work with the SDK but can't seem to get add a
campaign response, I've verified that my credentials are fine as I can
perform a lot of other functions but can't nail this one down. Is there
anyway to get a more meaningful error message than "Server can't
process request"?

Here's my code:
Dim service As New CrmService
            Dim myCreds As System.Net.NetworkCredential = New
System.Net.NetworkCredential
            myCreds = GetMyCredentials()
            service.Credentials = myCreds

            ' Get Current User Id
            Dim userRequest As New WhoAmIRequest
            Dim user As WhoAmIResponse =
CType(service.Execute(userRequest), WhoAmIResponse)

            Dim cr As campaignresponse = New campaignresponse
            cr.responsecode = New Picklist
            cr.responsecode.Value = 1
            cr.subject = "Auto-dialer response"

            Dim pCustomer As activityparty = New activityparty
            pCustomer.partyid = New Lookup
            pCustomer.partyid.type = EntityName.contact.ToString()
            pCustomer.partyid.Value = New Guid(sToGuid)

            cr.customer = New activityparty() {pCustomer}

            'set parent campaign
            cr.regardingobjectid = New Lookup
            cr.regardingobjectid.Value = New Guid(sCampaignGuid)

            'create campaign response
            'retVal = myService.Create(cr)

            'Create the activity
            ' Create the Target Object for the Request
            Dim target As New TargetCreateCampaignResponse

            ' Set Target Object's Properties
            target.CampaignResponse = cr

            Dim create As New CreateRequest
            create.Target = target

            ' Execute the Request
            Dim created As CreateResponse =
CType(service.Execute(create), CreateResponse)

            Return created.id

thanks a bunch,
KF

0
kevinforbes
4/12/2006 9:12:18 PM
crm 35858 articles. 1 followers. Follow

0 Replies
656 Views

Similar Articles

[PageSpeed] 49

Reply:

Similar Artilces:

Pls help Asset Allocation Question
My brother is 51 years and his wife is 46 yrs old. He is thinking of buying a home. He is not sure of how much of his total wealth / net worth should be in Stocks and Real estate Someone told him that cash and bonds aside, real estate and Stocks ( incl stock mutual funds) should be approx 50% each Since both stocks ( incl stock mutual funds) and real estate are more volatile, he was told to split that portion of his net wealth.. 50% each. Pls let me know if this is generally speaking, approximately correct...because I know it is difficult to be absolutely correct in these things with s...

Advice required
I need to create some graphs from data that is derived from a long series of separate calculations on my source data. For aesthetic reasons, I would like to hide all the "interim" calculations on the spreadsheet, but I've noticed that as soon as I hide the interim data (i.e set the row height to zero), the detail on the graphs disappears. I presume that this is a design feature feature of Excel (I supoose I can just about accept the rationale for it), but does anyone know whether there's a way around this? Many thanks. CRS. Use white fonts -- Regards, Peo Sjobl...

address book question #3
Using Outlook 2003... Whenever I open the Outlook Address Book, a dialog pops up telling me that the contact list associated with the address book can't be opened. Problem is, there are clearly contacts listed in Outlook. It gets really wierd when I check the properties for the address boon under "Tools --> Email Accounts --> View or Change existing directories or address books." There's nothing listed in there, yet there's a contacts folder listed in the "Show names from" dropdown in the address book dialog. So... How do I delete the current, e...

Creating an email message in Outlook 2007
What does Outlook use as the editor when creating an email message, looks very much like Word. Options no longer offers Word as an alternative. Hello, yes, Outlook 2007 uses Word to render and create messages- There is no possibility to change anymore. Roman Brehm "PE" <pitsofearth@msn.com> wrote in message news:%23imSovkXHHA.4308@TK2MSFTNGP05.phx.gbl... > What does Outlook use as the editor when creating an email message, looks > very much like Word. Options no longer offers Word as an alternative. > > > > It is word. If you have the office suit...

Create More than 1 Return for Same Invoice !!!
Hello In version 10.0. The RMA can create more than 1 return for same sales invoice! Is there any possibility to disable this properties? I need to prohibit anyone to create more than 1 return for same invoice. Any suggest ? no, that cannot be disabled. Too many firms have more than one return per invoice and it is not an option -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at http://www.AccoladePublications.com "Monzer Osama" wrote: > Hello > In version 10.0. > The R...

Entities with Multiple Entries - or Campaigns?
I hope someone out there will be kind enough to help me with this dilemma. Sorry this is lengthy but hopefully the description will make it easier to offer assistance. :-) We do a number of "marketing events" to which we invite clients and prospects. I've been reading a number of posts and thought I would be brilliant and create a new entity called "Marketing Events." In my dream I thought I would be able to create a list of events on one screen, then within contacts I would be able to select an event that a person had attended. Again, in my dream, I had th...

How do you create a list with name address phone in a column form.
I have an excel file with last name, first address city state in each column. I want to prepare a two column report with each persons name first then address then phone. Can't remember how to print out a different view of excel. Making it look more like a two column word document. Maybe you can use MSWord's MailMerge. http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge The first is from David McRitchie and the second is by Beth Melton and Dave Rado. denise108 wrote: > > I have an excel file with last name, first address city state ...

VarPtr() and StrPtr() questions
I just learned a bit about VARPTR and STRPTR. So I wrote some code that doesn't make sense: Private Type SR_REC SR_LONG As Long SR_STRING As String * 16 End Type Private Sub Form_Load() Dim LLL As Long, SSS As String Dim SR4(3) As SR_REC Debug.Print "A>"; VarPtr(SSS); " "; StrPtr(SSS); " "; VarPtr(I); " "; StrPtr(LLL) Debug.Print "B>"; VarPtr(SR4(0)); " "; VarPtr(SR4(1)); " "; VarPtr(SR4(2)); " "; VarPtr(SR4(3)) Debug.Print "C>"; VarPtr(SR4(1).SR_LONG); " &...

SFO Question about authentication
When SFO is "offline" , is there any validation against the current logged on user. i.e Does SFO check the current user to see if they are a valid CRM user? Thanks Mike Yes it does. Frank Lee Workopia, Inc. http://www.workopia.com/Links.htm San Francisco, CA "Mike R" wrote: > When SFO is "offline" , is there any validation against the current logged > on user. i.e Does SFO check the current user to see if they are a valid CRM > user? > > Thanks > > Mike > > > ...

Simple (I bet) Newbie question...
I hope this is possible to have happen all in 1 formula How can i compose a formula that would acheive the following: If the number in J5 is at least 10,000 but up to 24,999 then multiply cell I5 X B5 If the number in J5 is at least 25,000 but up to 49,999 then multiply cell I5 X C5 If the number in J5 is at least 50,000 but up to 99,999 then multiply cell I5 X D5 If the number in J5 is over 100,000 or above then multiply cell I5 X E5 If the number in J5 is UNDER 10,000 then display "Under Min" (or something like it) Thanks for reading!! Hi The formula should be enter...

Drop Down List Question #2
I have a drop down list from 5 cells merged together so as I can read the length easier, I know I cant select a field from merged cells, is there any way that when I select my choice I can get cells either side of my selection A B F 12 Jan Apples $12.00 17 Feb. Pears $14.00 I have B Column as my range in drop down , how can I get the date and price to move as well? What I want to do is select Pears and the date, Item and price would move to say K L P Columns if my drop down list was in L column...

If Question 02-03-10
Hi everyone Hope this isn't a silly question (as think I may have made it harder in my head than it needs to be! given all the formulas I'm putting in are bringing back errors!!) I have one worksheet which gathers info from other sheets and has the following info A B C D Name % % % In another worksheet I have a list of names (column M say M3) next to the names I want to put in a formula that will give me the following results: If M3 is in worksheet 1 and the corresponding cells to that name in b, c and d are all >0% write Yes...

Can I create a bar graph with both stacked and normal bars?
Hi I'm trying to create a bar chart for my company for turnover against targets. For the targets we want fixed bars, however on the turnover we wanted the same bars made up different colours, so the colours highlight where the turnover came from (therefore stacked). Can I have some bars fixed and some stacked on a chart please? On Wed, 6 Aug 2008, in microsoft.public.excel.charting, g <g@discussions.microsoft.com> said: >I'm trying to create a bar chart for my company for turnover against >targets. For the targets we want fixed bars, however on the turnover we >want...

Double click to open form and create new record
Hi team, Have scoured all of the posts and tried several different things for days but just can't seem to nut this one out. I have a form (FrmSeedBankStockAvailable) in datasheet view that lists seed lots by BatchID. I want to be able to double click on the record selector for a particular batch and have a form (DialogSeedBankWithdrawal) open so that I can make a new withdrawal entry, with the BatchID already entered from the selected record. I know that to do this I need to use the forms' DblClick property. I have been using the following code (and tried variations of from...

New created storage group wasn't displayed
Hi, I have Exchange 2003 on Server 2003. I created a new storage group and then I tried to add a user's mailbox to the new group, but there is only First Storage Group in the Mailbox Store box. The new created storage group didn't show up. Please advice. Any help will be appreciated. Thanks in advance! Lisa how long ago? did you create a mailbox store in the new SG? -- Susan Conkey [MVP] "Lisa" <Lisa@discussions.microsoft.com> wrote in message news:AE4B6E9F-AFEB-4F19-B7B0-2FA0EBF3B4B4@microsoft.com... > Hi, > > I have Exchange 2003 on Server 2003...

Un subscribe in Campaign
Hi, I am trying to create a campaign that the recipients can opt-out of if they want. I have been led to believe that this can be done easily in CRM 3.0. I need to know how to insert the auto-response auto-unsubscribe and auto-acknowledge into email campaigns. When you get to the point of creating an email there is a un-subscribe button on the toolbar, this doesn't seem to do anything and I cannot get the above functions to work at all. Can anyone help? Hass. ...

Creating new table columns and maintaining joins in another query
Hi, I have a table with alot of account information. However, to report on certain accounts, I have to manipulate a few of the column data and create a new column with the correct information. Once I have this new column, I do another query and get the information that I need out of that new column. The problem is when I'm querying from that new column, I'm join'ing that information to another column of information and it works the way I want it to work. But when I get more data, I have to run the original script that manipulates the data and creates a new column, agai...

Create Data Entry "Wizard"
Hi everyone, I'm trying to create a data entry "wizard" for a database. Basic premise - a company has clients that they need to be able to track various aspects of information about. All information might not be available at the time of entry. I'd like to have an AddClient form (data entry mode) with buttons for Add Address (ClientAddress form), Add Phones (ClientPhones form), and Add Emails (ClientEmails form). How can I pass the ClientID value created on the AddClient form to the ClientAddress (and other) forms? Thanks in Advance! On Fri, 14 Mar 2008 09:31:03 -...

Linking Question #3
I have several books that are all in the same folder (master templates) I'd like to link them with out recording the "full path", that way I can copy the files to "project" folders and use them. But I don't want them pointing back to the files in the master template folder. Can I declare some kind of variable %HERE% so that the linked files always searches the folder where the current file is located? Thanks for any suggestions. xjvs xjvs, Once way to do it that always works is to open the several files from the master folder, then save each file into the p...

created chart will not display
I tried to create a 3D pie chart within a spreadsheet. After highlighting the data that I wanted in the chart , the only thing that shows up is the chart title. The pie chart itself is no where to be found. Please advise Thanks,Belinda That probably means that Excel thinks your data are not numeric. If the values you are plotting are in, say, B2:B5, in some empty column, say C, starting with C2, enter =ISNUMBER(B2) and copy down to C3:C5. What do you get? -- Tushar Mehta http://www.tushar-mehta.com Custom business solutions leveraging a multi-disciplinary approach In Excel 2007 d...

Conditional Formating and SetFocus Question
Thanks in advace. This place has answered a lot of questions before I needed to ask. Now, I need to ask. I have a Continous Form [DetailSubForm] based on table [DetailTbl] that has the following fields. *[DetailID], [DocID], [CompDate],[SubDate], [ConfirmDate], and [ExpireDate]. The [DocID] field is a dropdown list that draws the data from the [TrainDocTbl]. I would like to use GetFocus to go to one of the Date fields depending on the selection made in [DocID]. It would also be nice to be able to declare the backcolor and forecolor of the whole record depending on that choice...

Yet another timers-and-threads question
I've got a requirement to be able to set a timer and be told when it expires, eg by a callback. SetTimer with WM_TIMER is not generally useful, as you have to have a window, and some of the threads in which I want to do this don't have windows. SetTimer with callback function is not generally useful, as it's not sufficient that there's a message pump somewhere in the *application*, there has to be a message pump in the *thread* that calls SetTimer (well documented, that, not), and some of the threads in which I want to do this don't have message pumps. CreateWaitableTime...

Question about forwarding mail to a POP3 server
I'm running exchange 2003 on SBS 2003 and have come across a difficult situation. Maybe one of you can help. Our client has the SBS inside their network and are using Outlook 2003 to interface with the Exchange server. They also have a POP3 server that sits out on the 'net. We have configured each client with an Exchange mail box as well as access to their POP3 account. When Outlook sends and receives it collects from both the local Exchange server as well as the POP3 boxes. When a user sends they use the Exchange server. Pretty straight forward so far. The challenge we ...

hardware upgrade questions
I am ready to upgrade the PC that acts as the server and back office PC for a setup running 2 POS lanes and 2 manager PC's that do not run POS. A few years ago it was setup with a XP pro, Pentium 4, 2.8GHz with 1 GB ram. Performance was fine, but now with several years of data, running sales history reports or movement reports is getting very slow. What is the biggest bottleneck for running these reports, hard drive speed, processor speed or memory? I have no problem in the budget for fast hard drives (thinking SAS 15K in a RAID 0) and memory, but how far should I go in upgrading t...

Windows 2003 64 bit and memory question
I have a windows 2003 64 bit server with 12 gb ram.. my question is how can I tell if a process , any process is using physical ram and paging file. I have an Oracle.exe that is using 5gb ram.. is that all physical ram or partly paging ram. ...