Results 1 to 4 of 4

Thread: Account Name in Opportunity

  1. #1
    uzaironbitzer is offline Junior Member
    Join Date
    Oct 2011
    Posts
    8

    Default Account Name in Opportunity

    I'm trying to use Sugar API to insert records into Opportunities. All the fields get saved EXCEPT for account_name and campaign_name. I can add/change these fields using the SugarCRM web interface but not through API. Here's the json I'm sending to API:

    method=set_entry&input_type=JSON&response_type=JSO N&rest_data={"session":"vta7ae9so0ee5genfg79o1een6 ","module":"Opportunities","name_value_list":[{"name":"name","value":"New Opp"},{"name":"account_name","value":"A\/Z Co Ltd 75003"},{"name":"currency_id","value":"-99"},{"name":"date_closed","value":"2012-02-03"},{"name":"amount","value":"2000"},{"name":"opp ortunity_type","value":"Existing Business"},{"name":"sales_stage","value":"Prospect ing"},{"name":"lead_source","value":"Cold Call"},{"name":"probability","value":"60"},{"name" :"campaign_name","value":""},{"name":"next_step"," value":""},{"name":"description","value":"some description"},{"name":"assigned_user_id","value":" 1"},{"name":"date_modified","value":""}]}

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Account Name in Opportunity

    Account Name and Campaign Name are RELATE Fields, so you need to modify the related records as well.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    uzaironbitzer is offline Junior Member
    Join Date
    Oct 2011
    Posts
    8

    Default Re: Account Name in Opportunity

    I think I need some more detail. Does that mean I have to set something on Accounts module as well or just passing account_id value to Opportunities would do the work?

  4. #4
    uzaironbitzer is offline Junior Member
    Join Date
    Oct 2011
    Posts
    8

    Default Re: Account Name in Opportunity

    OK, I've worked it out. Thanks andopes for the hint. I just needed to pass account_id instead of account_name to get it working.

    Now my other problem is that when I try to fetch opportunity data using get_entry_list and pass it account_id, it gets me blank fields, but when I try to fetch account_name, the correct values are returned. I want the related account_id for the Opportunity, what shall my get_entry_list call look like?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to convert an Opportunity to an Account
    By jbravo8212 in forum Developer Help
    Replies: 6
    Last Post: 2010-03-30, 02:31 PM
  2. Replace opportunity to account connection
    By rusdvl in forum General Discussion
    Replies: 1
    Last Post: 2009-12-07, 08:59 PM
  3. How to assign an opportunity to an account
    By studiprojekt in forum Help
    Replies: 1
    Last Post: 2009-06-02, 08:59 AM
  4. SOAP Opportunity & Account
    By dholmes in forum Developer Help
    Replies: 4
    Last Post: 2008-04-08, 09:44 AM
  5. Replies: 1
    Last Post: 2005-12-28, 06:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •