Can you import custom fields into SalesLogix via the Import Leads?

Question:

We are trying to import some leads and we need some additional fields.

We added the fields in the database. Within the “Import leads” form the new fields will not be displayed. OK, so we had a look at the “SLX Leads Mapping” Script, added the new fields there and so we can arrange the mapping in the form.

BUT: even if we mapped the new fields they won’t be imported.

 

Answer:

In plugin Import Leads:

 – look for “Dim arrLeadValues(x)” where x is a number that should be increased by the number of custom fields you are adding.

 

 – define new constants for each custom field using the next index numbers in sequence:

      Const IDX_LEAD_CUSTOM1 = 59

      Const IDX_LEAD_CUSTOM2 = 60

      …

– for each custom field, add a case stement to sub PopulateArrays( ) of the form

      Case “DB_FIELD_NAME”

            LeadValues(IDX_LEAD_CUSTOM#) = Mid(Value, 1, X)  ‘Replace X with the max size of the database field

 

or for booleans

 

      Case “DB_FIELD_NAME”

            strBool = “F”   ‘Default value

            If (value=”T”) Then

                  strBool = “T”

           End If

           LeadValues(IDX_LEAD_CUSTOM#) = strBool

 

– For each custom field, add a row to sub InsertRecords( ) of the form:

      LeadParameters(IDX_LEAD_CUSTOM#).Value = LeadValues(IDX_LEAD_CUSTOM#)

 

– Look for objLeadCommand.CommandText and modify the string to add the names of your custom fields to the end of the SQL column list, and then add an equal number of question marks (‘?’) to the parameter list.

 

In plugin SLX Lead Mappings:

– in Class_Initialize, add new rows of the form:

      AddRecord “DB_FIELD_NAME”, cLead, True, False

 

– in sub LoadFromLeadImportMap, increase the SLX_LEAD_FIELDS_COUNT constant by the number of fields you are adding. I believe that this will cause an error message to be generated if you open an old import map because it will not have the correct number of nodes. This could probably be fixed without too much trouble by editing the XML of the saved import map.

 

This has only been tested with custom boolean fields, but it should work for regular text fields.

 

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!