Hi,
I am helping a small business to move their customer management from Outlook (don't laugh!) to epesi. There are a few questions, mainly, how to remove some irrelevant stuff and gain some screen space. However, the first question is to migrate notes along with contacts. There is a single note field. Obviously, it's a one-time migration - so I don't need user-friendly UI, nor do I care about security for this. And I want to leverage Import module as much as I can. This is what I am planning to do:
Import customer data. If I could get id from contact_data, that would be great; however, the last name field is unique; so I can use that instead of id
Manually process a file of contacts and notes and do the following for every contact:
$id = select id from contact_data_1 where f_last_name = $lastname_from_file;
$next_id = insert into utils_attachment_link (local = "contact/$id", deleted = 0, permission = 0, permission_by = 1, sticky = 0, func = 'a:2:{i:0;s:25:"Utils_RecordBrowserCommon";i:1;s:27:"create_default_linked_label";}', args = 'a:2:{i:0;s:7:"contact";i:1;s:length(string($id)):"$id";}')
insert into utils_attachment_file (attach_id = $next_id, created_by = 1, created_on = DATETIME(), revision = 0);
insert into utils_attachment_note (attach_id = $next_id, text = $note_from_file, created_by = 1, created_on = DATETIME(), revision = 0);
(Hopefully, this pseudo-code is clear. I am mixing php-style variables with sql statements for brevity).
Obviously, I don't know what utils_attachment_link.func and utils_attachment_link.args stand for; but it looks like it is the same for all notes, so I can just cut and paste.
Is there anything else that I should be aware of? Is there any wiki that can guide me in this process?
Thanks
PS. I realize that this post may as well belong in Data Import forum...