Query contacts of one opportunity

I’m trying to query the list of contacts of one opportunity and i don’t know how I can do it.
This is my code:
oportunidad = new Opportunity();
OpportunityWS_OpportunityQueryPage_Input qbe = new OpportunityWS_OpportunityQueryPage_Input();
OpportunityWS_OpportunityQueryPage_Output qRet;
qbe.ListOfOpportunity[0].OpportunityName = "='myop'";
qbe.ListOfOpportunity[0].ListOfContact = null;
qRet = oportunidad.OpportunityQueryPage(qbe);
if (qRet.ListOfOpportunity.Length > 0)
if (qRet.ListOfOpportunity[0].ListOfContact != null)
foreach (Contact item in (qRet.ListOfOpportunity[0].ListOfContact))
xmlw.WriteStartElement("contacto");
xmlw.WriteAttributeString("Id", item.ContactId);
xmlw.WriteAttributeString("Nombre", item.ContactFirstName);
xmlw.WriteAttributeString("Apellido", item.ContactLastName);
xmlw.WriteEndElement();
The problem is that ListOfContact is always NULL

You need to add a Contact record to your input in order to get Contacts in the output. Instead of
qbe.ListOfOpportunity[0].ListOfContact = null;
do
qbe.ListOfOpportunity[0].ListOfContact = new Contact[1];
qbe.ListOfOpportunity[0].ListOfContact[0] = new Contact();
qbe.ListOfOpportunity[0].ListOfContact[0].ContactId = "";
...add the other fields that you need to query here...

Similar Messages

  • Report to display all the contacts of an opportunity.

    Hello,
    I have a requirement, can we create a report which displays all the contacts of an opportunity apart from primary contact.
    Any inputs on the same will be appreciatable. TIA
    Edited by: 1004233 on May 6, 2013 12:16 AM
    Edited by: 1004233 on May 6, 2013 3:28 AM
    Edited by: 1004233 on May 6, 2013 3:28 AM

    Hey Aveek;
       Try this, which will get the most recent one.  You would just need to change it to loop at the edids records to get at them all...
          TABLES: *edidc, *edids, *t100.
          DATA: wf_string type string.
          CLEAR *edids.
          SELECT SINGLE *
             INTO *edids
             FROM edids
             WHERE docnum = *edidc-docnum
               AND status = '51'.
          SELECT SINGLE text
             INTO *t100-text
             FROM t100
             WHERE sprsl = 'EN'
               AND arbgb = *edids-stamid
               AND msgnr = *edids-stamno.
             CLEAR wf_string.
          MOVE *edids-stapa1 TO wf_string.
          REPLACE '&' WITH wf_string INTO *t100-text.
          IF sy-subrc EQ 0.
            CLEAR wf_string.
            MOVE *edids-stapa2 TO wf_string.
            REPLACE '&' WITH wf_string INTO *t100-text.
            IF sy-subrc EQ 0.
              CLEAR wf_string.
              MOVE *edids-stapa3 TO wf_string.
              REPLACE '&' WITH wf_string INTO *t100-text.
              IF sy-subrc EQ 0.
                CLEAR wf_string.
                MOVE *edids-stapa4 TO wf_string.
                REPLACE '&' WITH wf_string INTO *t100-text.
              ENDIF.
            ENDIF.
          ENDIF.
          A little sloppy (OK, alot!), but it gets the job done...
    Cheers,
    John

  • Urgent --- assiging the contact person  to opportunity

    from the dit tool we are transfering data to crm , but for 1 opportunity it takes one contact no , but in system from which we are taking data has more than 1 contact number , for assigning more than 1 conatact no to the same opportunity in crm , what should i do , or which function module can help me

    Hello Pankaj,
    If i understood correct your problem is that you need to add couple of contact persons to opportunity.
    if its a problem goto:
    SPRO->SAP reference IMG->CRM->Basic Functions->partner Proccesing->Define Partner Determination Procedure
    Choose your FCT PROFILE(00000019 for Example) -> Partner Functions in Procedure -> Choose you partner Function (0000015 for example)->Press Details button ->No. of Occurences (Highest) should be greater than 1.
    Good Luck
    Eli Steklov
    Please Reward Points if it Helped

  • How can I transfer contacts from one iPad to a new iPad with different iCloud addresses?

    how can I transfer contacts from one iPad to a new iPad with different iCloud addresses?

    One way would be to e-mail them from yourself to yourself. That would totally avoid the different ID issue.

  • How can I move contact from one group to another?

    HOW CAN I MOVE A CONTACT FROM ONE GROUP TO ANOTHER GROUP?

    You usually make ​​contact groups via a computer (Mac or PC). If you use a mac and sync. via iCloud, you can go into Contacs.app and organize your contacts as you wish. Then (if) you sync with iCloud the groups you've changed or created will be displayed on your iPhone and (or) iPad.
    Hope this helped you.

  • How do I move a contact from one group to another?

    On my device, or in iCloud on the web, how do I move a contact from one group to another.  This should be as easy as it is with calender items, but the only solution I've found is to change your default contact group, and email the contact to yourself.  Then tap the contact, and add it to your contact list.  You can then delete the original.  Is there an easier way???

    Hi rjwrjw11,
    Thanks for visiting Apple Support Communities.
    If you want a song to be listed under a different album in iTunes, you can edit the song information:
    Fixing Incorrect Song or Album Listings in iTunes
    http://support.apple.com/kb/TA24677
    Editing Track Information in iTunes
    To view and edit a song or video's info in iTunes:
    Click once on the track title to select it
    From the File menu, choose Get Info
    Click the Info tab
    Best,
    Jeremy

  • How can I transfer my contacts from one group to another?

    I have recently discovered that most of my personal contacts have been synced with my work's MS Outlook. This brings two issues to me if I ever had to change jobs and hand over my laptop - 1) My personal contacts will be shared with an unauthorised audience, 2) If they delete my account I will never have access to my own personal contacts as well.
    I tried to see how I can transfer contacts from one group to another but I can't seem to get the hang of it. Can anyone help, please? All I need to do is associate the contacts that have been associated with my work's email account to one of my personal accounts.
    Thank you in advance!
    Rgds
    Dan

    If you use an online syncing service for managing your contacts then you can simply clean up the contancts on one installation, and the changes should update on the second installation immediately. This will only work if you use iCloud, Gmail, or another service for storing your contacts.

  • How do I delete    all contacts (at one time) from i      phone4

    Somehow I have gotten mutilple listing in contacts.  How do I delete all contacts from I phone and start over?

        baprawski,
    Is there a particular reason why you want to delete the contacts all at once? The only way you can delete all the contacts all one time would be to wipe the device. This will complete erase all data on the phone including the contacts.
    You want to make sure you backup your device uisng the desktop manager. Once you perform the wipe you can then backup your contacts using the desktop manager and just make sure to uncheck the Contacts when backing up so they are not added back to your phone.
    John B
    Follow us on Twitter @VZWSupport

  • How to move contacts from one account to another

    I have 2 exchange accounts configured in my iPhone, one Corp exchange account and one personal exchange account, both have Contacts sync enabled.
    I noticed somehow all of new created Contacts are under Corp account, these Contacts do not show up on my iPad / Mac which only have personal account.
    How can I move the selected Contacts from Corp account to personal account?
    How can I choose which account to use when I create a new Contact?
    Thanks

    I can answer your second question but I share your problem related to the first question.
    In answer to your second question:
    To make sure that new contacts go into the desired account:
    1.     Go to Settings
    2.     Select "Mail, Contacts, Calendars"
    3.     Scroll down to "Contacts"
    4.     Select the last item in the group, "Default Account"
    5.     A list of the accounts on your iPad will appear.  Select the account that you want to use for your new contacts.
    If you solve the problem of moving existing contacts from one account to another, I'd love to hear about it.

  • In contacts app how can I move a contact from one group to another group?

    I find I cannot move a contact from one group to another group. If I delete a contact from one group I delete that contact from my total contact population. I did not have this problem in earlier IOS versions. Can anyone help me?

    Thanks SO much, Barney.  How embarrassing, I could have sworn that I tried that first.
    I will definitely get them all moved over before I delete that account and I've already gone in & changed my preferences.  Several years ago, my husband I decided to share one calendar and one contacts list, using his mobile me account and it's been great for us.  I'm particularly thrilled to no longer serve as a human rolodex and I guess that I paniced a bit when I thought there might be a problem with our system.  I'm still confused where that "On my mac" account came from on the first place.  Do you suppose that was an automatic thing that came with the Mountain Lion upgrade?
    thanks again!

  • TS2776 How can I transfer e-mail contacts from one IPad to another?

    How can I transfer e-mail contacts from one IPad to another?

    Depends on how big the file is.  If itis only a couple of pages, or mostly text, the easiest way would be to e mail it.  If it is a very large file you are going to need wifi.  Take both pads to starbucks, and e mail it from there.  Or if you have wifi, use drop box, for example. 
    Your other choice, avoiding wifi would be a bluetooth type transfer.  There is an app call bluetooth file lite that reads like it will do what you need.   The good news is it is free.  The bad news is that it has terrible ratings.  For grins, i am installing it now on a pad and a phone, and will see if it works.
    With a bluetooth method, you need both devices in  the same place.  If you are trying to send your file across country, bluetooth will not work for you.  you need e mail or drop box type solution, and if the file is big, you will almost certainly need wifi.

  • I have two phones with one apple id i have lost most of my contacts from one of them

    i have two phones with the same apple id but i have lost most of my contacts from one phone

    Apps are tied to the Apple Id they were purchased with. So any updates for the Apps will ask for that apple ID to update.
    The only way to prevent this is if you remove all the Apps that were purchased with your ID from the iPad.

  • How do i copy contacts from one apple id to another?

    how do I copy contacts from one apple id to another?

    I assume you mean you want to copy them from one iCloud account/ID to another.  If they're synced with iCloud go to Settings>iCloud, turn Contacts to Off, when prompted choose to Keep on My [iDevice], then delete the iCloud account, sign into the other iCloud account, turn Contacts back to On and when prompted choose Merge.  Note: when you delete the account it only deletes the account from the device, not from iCloud.  If you then want to go back to your previous account, delete the iCloud account from your device, when prompted choose Delete From My [iDevice], sign back into your other account, turn your iCloud data syncing back to On, and when prompted, choose Merge.

  • How to delete multi contacts in one time

    i need to  delete multi contacts in one time there is any way for this.

    Just install iPhone PC Suite on your computer. It supports for adding new contacts, exporting and deleting contacts in batch from iPhone, importing contacts to iPhone and removing duplicate iPhone contacts, etc.

  • HT204150 How to transfer contacts from one iCloud account to another

    How can I transfer contacts from one icloud accunt to another.
    After the transfer I want to delete one icloud account have one running.

    Are you a Mac or a PC user?
    If Mac, export the contacts from Address Book as vCards, log out of the 1st iCloud account, and log in to the 2nd iCloud account, then re-import the exported contacts into Address Book.

Maybe you are looking for

  • Configuring SSO to a URL iView

    hi everyone...... i'm relatively new to EP.... and my requirement is..... i've created a URL iView and when i logon to the portal.....i need my <b>yahoo or gmail inbox</b> to appear in this URL iView..... i read frm a thread that i need to confgure S

  • Acrobat XI Quits When Trying To Print

    Recently installed several Adobe products from the Creative Cloud onto my Snow Leopard Mac and whenever I try to print something from Acrobat, it quits. There's a bug in there somewhere but I have no idea how to rectify the situation and use the prod

  • I want to Edit PDF file using java(urgent)

    if any body helps me i shall be thankful to him. its urgent i hav to complete my assignment.

  • M2v files suddenly have blank icon and open droplet app

    Hi everybody Suddenly all my m2v files have lost their quicktime icon. When I double click on them, they open an application called droplet which I've never seen before and do not know what it's for. Yet, if I drag the files to the quicktime (pro) ic

  • Photoshop cs5 (small problem)

    I've just upgraded from CS2 to CS5 extended. I notice that when I want to create a new document, I don't have the preset options like A3, A5 and the others like I did in CS2. Anyone know if this is meant to be like this? The presets I have now are: p