+ Start a Discussion
Bard09Bard09 

Bulk inserting Custom Settings?

Our organization uses county-based designations in the United States for Territory Management, and we've managed to hack it into Salesforce for the last few years by doing the following:

 

1. Creating a custom formula field on Accounts that concatenates State & County, eg "WA-Snohomish"

2. Concatenating all 3,141 State/County combinations each year in Excel as above, matched to each of that year's territories

3. When specifying Management Rules for each territory, copy/paste as many items as above into each filter as possible, eg "WA-Snohomish,WA-King,etc"

 

This has worked for the last few years but it gets old doing so much manual data entry work to get this imported into Salesforce each year.

 

When I read about Custom Settings I immediately jumped for joy, because from what I read, it seemed like the List option would allow me to create what is effectively a static data table of these County designations, along with Territory, and directly query that for the Territory Management Rules... or at least a Formula field at the Account level.

 

Can anyone think if this would be possible?

 

Provided that it would be possible, I have another question: how would we bulk-insert the 3,141 records each year into the Custom Setting?

 

I've tried adding a Custom Setting and it appears to only work record-by-record.  There doesn't seem to be an entry in the Data Loader for bulk-inserting Custom Settings, either.

 

Anyways-- if anyone could help me with these questions, I would be very appreciative!  Thanks in advance.

DevNVDevNV

I believe you can import records - each Custom Setting essentially creates a new object in your schema with fields etc.  You should be able to see them with Excel Connector or other data loaders and run imports same as you do with regular objects.  If your custom setting is called "Territory_Definitions" then the object to look for is "Territory_Definitions__c".  If you don't see it in Data Loader it could be the API version - I can see it with the Excel Connector.

 

Definitely cuts down on queries and query row exceptions.

 

Niki

www.vankerksolutions.com