Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Use Transaction import to create a new record from Control Macro

(0) ShareShare
ReportReport
Posted on by

This is a related question from a previous post about TI. 

What I am trying to do is create a new shipping address for every customer in the database. The only real difference is the name of the ShipToID and the TaxID1  of the address. Everything else will be copied from the default address for each customer.  

We have about 6,600 customers. The problem that I have is creating a data file out of the customer information I export from Excel.  I can export the "Default" address for each customer into a CSV file.  Obviously there is one line per address.  The data file for TI, however, needs Level0 and Level1.  I don't know how to create an Excel file with two lines per customer from the single line in the .CSV without a ton of manual labor.  Basically I would have to turn 6,600 rows into 13,200 rows by hand.  So, here are my questions:

1.  Is there a relatively easy way to create the Excel file I need that can then be exported to CSV for TI?

2.  If not, can I create a data file that just has the level0 records for the customer ID and then hard code the changes into the Control Macro? The reality is that I am happy to accept the default address for all fields but the two that I require to change to create the new address which are the ShipToID and the TaxID1 fields.

In testing that I did today I found that even if I hard code the new data into the control macro, TI does not create the new addresses.  I am assuming that is because I don't have any Level1 information in the data file and thus TI doesn't try to create a new address.  When I run TI on my test data I see it open each customer and then immediately close it.  Again I assume that is because there is nothing in the data file to prompt it to enter any level 1 data.

Any tips or tricks to get this done?  

Thank you for your time. 

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Use Transaction import to create a new record from Control Macro

    I ultimately did something very similar:

    I first imported the data set into two identical Excel files. Each file's first column was the CustID field which I duplicated to another column for later sorting.

    I then created a new column for the level.  I populated that column in each file with the appropriate level.  Level0 for file one Level1 for file two.

    I then deleted any data I didn't need in each file for that particular level and added/manipulated the data that I did need. Ultimately I had two files and each file had the correct row data for the level that file represented.

    I then copied File 1's data into the bottom of file two.  The extra CustID column and the Level column were the same column, A & B respectively.

    I then sorted on columns A & B and then deleted Column A that I no longer needed.

    The result was something like this:

    Level0,CustiD1

    Level1,ShiptoID,Data1,Data2...

    Level0,CustiD2,

    Level1,ShiptoID,Data1,Data2....

    That seems to have a done the trick!

  • Verified answer
    Erich Strelow F Profile Picture
    16 on at
    RE: Use Transaction import to create a new record from Control Macro

    In these cases I use the Excel row shuffle trick.

    First you start with these cells:

    Bob - Elm Street

    Pam - Fifth Ave

    Jack - Main Ave

    You add a numbering cell on the side:

    10 Bob - Elm Street

    20 Pam - Fifth Ave

    30 Jack - Main Ave

    Then copy the rows

    10 Bob - Elm Street

    20 Pam - Fifth Ave

    30 Jack - Main Ave

    10 Bob - Elm Street

    20 Pam - Fifth Ave

    30 Jack - Main Ave

    Adjust the numbering:

    10 Bob - Elm Street

    20 Pam - Fifth Ave

    30 Jack - Main Ave

    15 Bob - Elm Street

    25 Pam - Fifth Ave

    35 Jack - Main Ave

    Play around with the field layout so you have different record types:

    10 Bob

    20 Pam

    30 Jack

    15 Elm Street

    25 Fifth Ave

    35 Main Ave

    Now sort the rows on the numbering column

    10 Bob

    15 Elm Street

    20 Pam

    25 Fifth Ave

    30 Jack

    35 Main Ave

    There you go...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

#1
Community Member Profile Picture

Community Member 136

#2
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 102 Super User 2025 Season 1

#3
REUser Profile Picture

REUser 8

Featured topics

Product updates

Dynamics 365 release plans