Solved

Import scenario to replace default salesperson on customer account

  • 23 November 2022
  • 11 replies
  • 395 views

Userlevel 5
Badge +1

I’m trying to create an import scenario that replaces the current default salesperson on the customer account with a new salesperson, sets the new salesperson as the default, and still works even if there is no current default salesperson assigned.

This is what I have so far, but it currently only adds the new salesperson and sets them as default; I’m not sure how to remove the original default salesperson if there is one:

 

icon

Best answer by mikeho 25 November 2022, 17:24

View original

11 replies

Userlevel 4
Badge +1

Hello Mike, to delete a line from a grid you need to map <Line Number> line to =-2. Here’s a link where you can find an example on how to map this type of scenario (min 57:58): 



Hope it helps. 

Userlevel 7
Badge +16

Hi @mikeho 

Here is another thread that might help.

 

https://community.acumatica.com/import-and-export-scenarios-117/import-scenario-2020r-updating-salesperson-and-general-information-11947

 

@laura01  had a good solution on here as well. 

Badge +11

Disregard; can’t delete

Userlevel 5
Badge +1

@riglesias - Am I correct in understanding that I’d need to set the Field/Aciton name to @@SalesPersonID in order to do this? Because Acumatica doesn’t allow me to do this (the row disappears after I type that into the field).

 

@kbeatty21 - I don’t see a solution from @laura01 on that post (only a question), can you clarify?

Userlevel 7
Badge +16

Hi @mikeho 

I tagged her on accident. I meant to tag @riglesias. You need to do the -2 to delete then add the new salesperson. 

Userlevel 4
Badge +1

@riglesias - Am I correct in understanding that I’d need to set the Field/Aciton name to @@SalesPersonID in order to do this? Because Acumatica doesn’t allow me to do this (the row disappears after I type that into the field).

Hello@mikeho 

That is correct, the @@ notation is used to setup a custom key. In this case, since Salesperson ID it’s a key field the system automatically adds the key lines and you just need to map the field to the one from your data provider and map below <Line Number> mapped to =-2. Like this:

 

 

 

Userlevel 5
Badge +1

@kbeatty21 & @riglesias - I’ve added the -2 but now it’s not making any changes at all:

 

Just to clarify - are you saying I need to add a field for the original default salesperson ID that needs to be removed, and use the -2 to delete that ID first, then add the new Salesperson ID? If so, is there a way to do this without having to include the original salesperson ID and just have Acumatica delete what is there regardless before adding the new salesperson ID?

Userlevel 5
Badge +1

@kbeatty21 & @riglesias - I tried adding a separate line for the original salesperson ID (to delete) but when I run the import scenario it is just adding the new salesperson ID and setting it as default, leaving the original salesperson ID on the account as well:

 

Userlevel 4
Badge +1

@mikeho I would recommend you to run two separate scenarios. One to add or set the default salesperson you need (this one should not have <Line Number> line mapped to =-2). Then another scenario to delete the salesperson/s you need. Notice that in the screenshot I sent <Line Number> line is mapped below Salesperson ID: 

 

 

Userlevel 5
Badge +1

Thanks, everyone! I was actually able to get it to work in one import scenario by inserting a <Save> after deleting the original salesperson ID:

 

Userlevel 7
Badge

Thank you for sharing your solution with the community @mikeho !

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved