How to check presence of contact in kentico while importing contact through CSV ?

Joy Basak asked on September 19, 2017 06:40

Hello all ,

Currently I am using kentico 10 so by default its checking presence of a contact by only "EmailAddress" but instead of that i want to check by both "FirstName" and "Email". I think some thing we need to check in Bizform_insertBefore but not sure .Can you please help me out to resolve the same .

Thanks in advance

Joy

Recent Answers


Trevor Fayas answered on September 19, 2017 13:58

insert before would do the trick. you can see the contact through:

ContactInfo theContact = (ContactInfo)e.object;

if you then look up and find a match you can can the e.cancel() i believe, hopefully it will not stop the entire process. If it does, next option is to clean up your csv by manually importing to a temporary table, selecting any non duplicated contacts using SQL, then take that result and make a new clean csv to pass.

0 votesVote for this answer Mark as a Correct answer

Joy Basak answered on September 20, 2017 04:55

@Trevor Fayas
Thanks for the reply . I tried with the insert_before its not even executing the code block because the the contact form is not a Bizform.So bizform insert_before wont work.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on September 20, 2017 15:34 (last edited on September 20, 2017 15:35)

Sorry I should have clarified, you want to use the ContactInfo insert event, not bizform. You're using the wrong hook. Pretty much every class in Kentico has it's own events you can hook into. THis is through the ____Info.TYPEINFO.Events

You want to use the

ContactInfo.TYPEINFO.Events.Insert.Before

Try that!

0 votesVote for this answer Mark as a Correct answer

lauren ebsary answered on September 28, 2017 12:07

Magine saving your information in a spreadsheet, and all of the extra essay writing UK statistics that is going with it like formatting, spacing, column widths, facts assets, and on and on. All that stuff bloats the record size.In case you are best interested by the values stored inside the spreadsheet then you could shop in csv layout which writes all of the statistics out to a textual content file. The top notch gain is that each price is separated by means of a comma (or a few different delimiter, it does not absolutely should be a comma, despite the call) permitting you to read out man or woman values, however in any other case it is just one massive string, so there is no bloat related to the report. Csv files are top notch if you're migrating records from one system to every other, or different cases in which you've got a huge quantity of records to transport around, but are not interested in some thing apart from the values themselves.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.