0

Im using C# to try and add a known contact to a known prospect list. I have the ID for both of the instances.

Im trying to use set_relationsip to do it but im getting no where, i have been abe to add a contact to a opportunity and account but not to a prospect list or product. Every example i find is in php, although i can read it, following it step by step and doing it is C# just never works, always get a failed flag.

string Contact = "9b312856-0d04-edec-81ca-51de504f8b41"; string Target = "8c33a9dd-70c1-1a38-09e4-527aeef43115";

            string single = Target;
            string[] arraysingle = {Contact};

            var a = new name_value { name = "", value = "" };

            name_value[] temp = {a};


            var rel = sugar.set_relationship( loginToken.id, "prospects", single, "contacts", arraysingle, temp, 0 );
user2031303
  • 1
  • 1
  • 2
  • Hi. The name of the module should be ProspectLists and not prospects. Test in this way. Bye. – Antonio Musarra Nov 08 '13 at 08:23
  • 1
    Your a legend worked perfectly. I also tried the list for Products and that wouldnt work either, any idea what the list is for products @AntonioMusarra – user2031303 Nov 09 '13 at 06:30
  • It's not a solution to your specific problem, but you may want to see if the this Sugar C# Client would have support for that https://github.com/dlively1/SugarSharp – Chad Hutchins Feb 18 '14 at 22:04

0 Answers0