AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Everything Else
Conditionally creat...
 
Notifications
Clear all

Conditionally create new Stock Items' cross-reference record with an import scenario

 
Everything Else
Last Post by Paul Lambert 2 months ago
1 Posts
1 Users
0 Reactions
216 Views
RSS
Paul Lambert
Posts: 6
 Paul Lambert
Topic starter
July 24, 2025 1:40 pm
(@plambert)
Active Member
Joined: 7 months ago

I'm preparing for a large conversion of Stock Items. Mostly to save on transaction count, I'm looking to do many things all during the initial import, such as adding Cross Reference records for the Vendor Part Number. Unfortunately, not every Stock Item to be created has a Vendor Part Number and, when this is the case, the import will error saying 'Alternate ID is required' and the whole record will fail. I'd prefer to avoid multiple different import scenarios.

What I would like is to have a <Line Number> statement to conditionally delete the cross-reference record if the Alternate ID is empty, but I don't know of a way to recreate the Delete Row action (usually <Line Number> =-2) when there is a formula involved. If anyone knows how to accomplish this, I'd appreciate your sharing.

What I don't like is the solution I discovered:

image

My initial idea was to add another blank record after adding the potentially erroneous record. Then it would selectively delete either that blank record if the original record won't cause an error, or the original if it would result in an error. Blank records seem to delete themselves if they aren't committed, so I'd either end up with nothing or a valid Vendor Part Number record. Now, the above import scenario works, but not how I expected and only when there aren't any existing cross-reference records.
<Line Number> | =iif([...AlternateID]=null, -1, -2)
This line will either select the last record or second to last record based on if there's an Alternate ID. I thought that I would need the condition reversed, expecting the blank record to be after the populated one. But since I never actually made an initial record, I don't know what order these records are being sorted into. That initial record seems to be existing in a weird state where I never explicitly added a new record, but populated something.

 

Can anyone explain this eldritch import scenario situation that I have stumbled upon? I'd like to be able to generalize this so that it can be used when there are existing records to conditionally add on more. The main issue is that if there is an existing record, say, a UPC, then that UPC gets overwritten.


Topic Tags
Import Scenario
Forum Jump:
  Previous Topic
Next Topic  
Related Topics
  • Purchase Receipt Creation skips every other line with Import Scenario
    6 months ago
  • Update Existing Vendor Import
    1 year ago
  • Import Scenario: Using Master Detail Record in Detail insert
    1 year ago
  • Import Sales Order Invoice SO3030000
    1 year ago
  • Import Scenario for Customer Activity (from Ring Central)
    2 years ago
Topic Tags:  Import Scenario (19) ,
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 14 Online
  • 2,324 Members
Our newest member: Michael Kiley
Latest Post: Pick List report suddenly not splitting on Shipment
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×