2
votes

I am importing data from csv file in CRM2011, I was wondering if there a way to ignore a complete row, eg, if type = P then add if type = S then ignore?

Cheers

2

2 Answers

3
votes

Using the Imports section of the Data Management area I think the only way you might have a chance at getting this to work is if you can control some other row value and make it invalid which would cause the entire row to fail on your type 'S' records.

Another alternative would be to use the SDK and create your own custom data mapping routine where are can have a bit more control over which records get processed.

SDK documentation http://msdn.microsoft.com/en-us/library/hh547396.aspx

0
votes

You could encourage CRM to consider the rows you're importing to be duplicates, or to be invalid lookups. Or you could accomplish this with workflow.

For example, if you mapped your 'type' field to an attribute, then made sure you had a record where that value is set to 'S', then set up a duplication rule to not allow records with non-unique 'type'.. that might work.

Or, you could try mapping 'type' to an Option Set which doesn't have a value for 'S' in it. This might work, or it might important blank, I'm not sure.

Or, you could make a workflow to retrospectively delete records where 'type' field is 'S'.

My disclaimer would be that none of these sound like particularly good ideas to me.

EDIT: another option is edit your CSV in Excel and remove the rows you don't want. That does sound like a good idea because then you're not asking the import wizard to do anything clever.