Best solution for inputting a dictionary/map object as a CRM variable.

Best solution for inputting a dictionary/map object as a CRM variable.

What I have in mind is to create a dictionary/map object that assigns a 15 digit code to all numbers from 1-1000. 

Essentially, I'm going to use the "number" of a record to assign it one of these 15 digit codes. 

I.e. let's say my dictionary looks like so:

  1. barcodes_map = {
  2. 1: "XXXXXXXX",
  3. 2: "XXXXXXXY",
  4. 3: "XXXXXXYZ",
  5. etc
  6. }
You get the point. I'm just mapping all integers from 1-1000 to a code. 

The purpose of this is that when a record is created, I should be able to invoke a workflow that takes that record's number, and retrieves the corresponding code from this dictionary. 

I.e. record number 1 will have the first code in the dictionary, record 2 will have the 2nd, etc. 

I don't think it's feasible to include such a large dictionary object within the function itself, so I'm curious as to what the best way of executing something like this might be. Any help would be great, thanks!