cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Sloc to all line items in sales order VA01

0 Kudos

Hi everyone,

Any body can give Script to copy Storage location to all line items S.loc fields in the sales order ?

screen shot attached for reference

Advance thanks to all

Accepted Solutions (1)

Accepted Solutions (1)

steverumsby
Active Contributor
0 Kudos

In Personas 2 it isn't possible to build looping constructs in scripts, and so copying a value to all of a variable number of rows isn't possible. The best you can do is have a bunch of IF statements that say, "If line number column of line 1 isn't empty paste into sloc column", "if line number column of line 2 isn't empty..." for as many lines as you think might appear. If a sales order ever has more lines than the maximum you choose, the process will obviously stop short.

This will be possible to do properly in Personas version 3.

Steve.

0 Kudos

Thanks Steve

former_member189842
Participant
0 Kudos

Steve,

Can we use javascript loops using calculate in javascript rule?

steverumsby
Active Contributor
0 Kudos

You can use JavaScript loops, but you can't interact with screen elements that way. There's no equivalent of "Copy Value" or "Paste Value" you can use in a Javascript action.

As I said, you can do this in Personas 3.

Steve.

0 Kudos

Hello Steve,

We started using personas in Production system.

The script button which I created is working fine in Quality System; but it's not working in the Production.(I completed the transport without any errors).

Kindly help me;

steverumsby
Active Contributor
0 Kudos

Can you please post this as a separate discussion so that others who might have the same problem can find it more easily.

And when you do, please include more detail of the problem. "It doesn't work" is really hard to diagnose. Tell us what the button is supposed to do, how it is misbehaving, and ideally also include the script. The more detail you include the easier it is for us to help.

Steve.

Answers (0)