Results 1 to 2 of 2

Thread: Salesforce task and attach migation to sugarcrm ce 6.0.2

  1. #1
    danielerew is offline Member
    Join Date
    Sep 2010
    Posts
    7

    Exclamation Salesforce task and attach migation to sugarcrm ce 6.0.2

    i have a little problem. I have imported into mysql server database the export of salesforce backup.

    1 PROBLEM MIGRATION TASK
    --------------
    when i try to import the task salesforce have 2 field that are basecode ecode whatid and whoid this fields links the task to opportunity case contatct and so. i saw that sugar have i fileld that divide this thing parent_type.

    the problem is..how can i know how map the right field with righe value?
    whatid = Lookup(Contract,Campaign,Account,Opportunity,Produ ct,Asset,Case,Solution,VCSEmail,VCS_MailBox_Config );

    whoid= Lookup(Contact,Lead)


    in the parent type of sugar the value is clear into salesforce fields are encode..the value.

    -------------------------------
    2 Problem and the attachment ?


    best regards
    Daniele

  2. #2
    blak3r's Avatar
    blak3r is offline Sugar Community Member
    Join Date
    Sep 2010
    Location
    Maryland
    Posts
    240

    Default Re: Salesforce task and attach migation to sugarcrm ce 6.0.2

    Here is the relevant C# code we used to migrate from the CSV's into sugar.
    AppendStringQuery argument 1 is the sugardb column name, the second argument is the column from CSV.

    Code:
       private void btnTaskCRM_Click(object sender, EventArgs e)
            {
                foreach (DataRow row in dttempMas.Rows)
                {
                    ResetStringQuery();
    
                    string TaskID = row["ID"].ToString();
                    AppendStringQuery("id,", TaskID);
    
                    AppendStringQuery("name,", row["Subject"]);
                    AppendStringQuery("date_entered,", dateConvertforMysql(row["CreatedDate"].ToString()));
                    AppendStringQuery("date_modified,", dateConvertforMysql(row["LastModifiedDate"].ToString()));
                    AppendStringQuery("description,", row["Description"]);
                    AppendStringQuery("deleted,", row["IsDeleted"]);
                    AppendStringQuery("modified_user_id,", row["LastModifiedById"]);
                    AppendStringQuery("created_by,", row["CreatedById"]);
                    
                    // TODO - Need to make sure task status picklist values exist already.
                    AppendStringQuery("status,", row["Status"]);
    
                    // TODO - Fix this value... probably should be date_start.
                    AppendStringQuery("date_start,", row["RecurrenceStartDateOnly"]);
    
                    // TODO - verify priority picklists exist.
                    AppendStringQuery("priority", row["Priority"]);
    
                    AppendStringQuery("assigned_user_id,", row["OwnerId"]);
                    AppendStringQuery("team_id",TEAM_ID); 
                    AppendStringQuery("team_set_id",TEAM_SET_ID); 
    
                    //AppendStringQuery("assigned_user_id,";
                    //AppendStringQuery("team_id,";
                    //AppendStringQuery("team_set_id,";
                    //AppendStringQuery("date_due_flag,";
                    //AppendStringQuery("date_due,";
    
                    //AppendStringQuery("date_start_flag,";
    
                    if (!row["WhoId"].ToString().Equals("000000000000000AAA"))
                    {
                        AppendStringQuery("contact_id", row["WhoId"]);
                    }
    
                    // TODO determine how Tasks are attached to just leads.
                    if (!String.IsNullOrEmpty(row["AccountId"].ToString()))
                    {
                        AppendStringQuery("parent_type", "Accounts");
                        AppendStringQuery("parent_id", row["AccountId"]);
                    }
                    Insertdata("tasks");
    
                }
                MessageBox.Show("Data Upload complete");
                btnTask.Enabled = false;
                btnTaskCRM.Enabled = false;
            }
    Sugar 6 Pro, On-Site (Apache 2.0, MySQL 5.1, PHP 5.2.6)

    My SugarForge Projects:
    Email To Sugar - Archive emails in any mail client by adding a BCC line.
    Task Dashlets Plus- Adds custom dashlets for: tasks assigned to me by others, delegated tasks, overdue tasks, and open tasks past start date

    www.blakerobertson.com

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2008-09-05, 11:07 AM
  2. Replies: 0
    Last Post: 2008-09-05, 11:02 AM
  3. SugarCRM vs. Salesforce
    By davidsmith31988 in forum Help
    Replies: 3
    Last Post: 2008-02-18, 10:57 PM
  4. SugarCRM v. Salesforce.com
    By jecker in forum General Discussion
    Replies: 3
    Last Post: 2007-03-09, 05:37 PM
  5. Replies: 1
    Last Post: 2005-05-03, 09:22 AM

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
  •