web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

The following C/AL functions can be used only to a limited degree during write transactions because one or more tables will be locked. Vendor

(0) ShareShare
ReportReport
Posted on by 2,445

When trying to Import the Vendor Table 23, i get the above error message against the City Field, i believe this is to do with the automatic Post Code to City checker? We are still in Development stage, aso we are still new to this, but would like to know my options to help clear this in the future, aside from population the table with every GB Post Code?

Thanks

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Is that the FULL & Exact Error message? Is anything missing (always post full error messages)

    How are you importing?  Did you turn on the debugger to get the exact place that is causing the error?
    Are you validating the post code field or the city field?
    If you don't validate & just import you shouldn't see the message.

    Or you can also populate the zipcode table at the same time.
    Forexample if using a dataport. you import the zipcode & city name into variables.
    OnAfterImportRecord you could do a

    if ZipCode.GET(ZipVariable) then begin
      ZipCode.City := MyCityVariable;
      ZipCode.Modify;
    End Else Begin
      ZipCode.City := MyCityVariable;
      ZipCode.ZIP := MyZipVariable; 
      Zipcode.Insert;
    End;

    then you map your Vendor Fields afterwards.

     More Info: http://www.mibuso.com/forum/viewtopic.php?f=23&t=23929

     

  • Ian Fletcher Profile Picture
    2,445 on at

    Hello, looks like i missed the last part, here goes:-

    The following C/AL functions can be used only to a limited degree during write transactions because one or more tables will be locked.

     

    Form.RunModal is not allowed in write transactions.

     

    CodeUnit.Run is allowed in write transactions only if the ret

    In classic  I selected the fields, exported to Excel, populated the fields in Excel & then tried to import back in via Classic Data Migration - to note, we had 740 errors from 1800 records, so over 1000 when straight in.

    Debugger - No

    Validating - not sure what you mean, from the export i selected Post Code & City as part of the Migration Fields

    So we are using the Data Migration export to Excel/Import from Excel routine.

    I have been advised it is to do with the City/Post Code checker, so eg I may have an entry for London in this table, so when it then tries to import another London City & Post Code, it errors because that new combination does not exist in the table??

    Hope this is clear.

  • Community Member Profile Picture
    on at

    Did you turn on the debugger to see what's causing the error.  Most Likely a RunModal command somewhere.  When you enter a customer manually with & without an existing zipcode does a form pop up?

    As for the Datamigration - I haven't used that tool - I use Dataports & Xmlports which give me full control.

    Allows me to dictate what I would like to have happen if something exists already & if it does not.

    As for validating - nav fields can have code behind them.  On entry of a value into a field, depening on that field, it can have some code that triggers something else to happen.  for example on My customer table & the ZIp Code field it has this code..

    ZIP Code - OnValidate()

    IF ZIPCode.GET("ZIP Code") THEN

     VALIDATE(City,ZIPCode.City);

    Wher on enter of a zipcode in the customer table, it checks if it already exists in the ZIP code table.  If it does it then populates the customer City fields with the value already present in the zipcode table.

    so by controling the validation while importing you can bypass this action which might be the cause of your problem.

    But if you think it;s due to the zip table not containing all the values you need then why not take that excel file, copy & paste into a new sheet the zipcode & city columns and import that first into the zip table! then do your customer list.

  • Ian Fletcher Profile Picture
    2,445 on at

    Hi, we tried adding all the City's & Post Codes in to the Post Code table, but we still got the error, we have been told the other "get around" is to empty the Post Code Table, run the data migrtaion import & then populate the Post Code table, this is not a good solution.

  • Community Member Profile Picture
    on at

    There are numerous get arounds.

    1st// The easiest one if to NOT validate the zipcode field on your import.

    2nd// comment out the code Onvalidate of the zip code field of the customer table & put it back after your done.

    3rd// you can import all the other fields but the zip code field and using a processing report after, to get the values from the zip code table & populate the customer table.

    these are all simple ways.  if you create your own xml or dataport you will have total control.  What are you using the RIM tool?

    Note: clearing the zip table is not a big deal.  You can always copy & paste the whole table from nav to excel for re-importing later.

    Why isn't your Nav partner doing this for you? - or are you a partner?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans