on 2021 Aug 12 3:48 PM
Hello,
We wrote a global script for if an attributes has only one selectable option system automatically selects this attribute value and makes the attribute read-only. Script works fine but it takes 12-15 seconds to execute even though when we execute same script on Script Workbench it only takes 0.016 seconds. Does anyone have an idea why this might happening?
count = 0
for x in Product.Attributes:
if x.Name <> 'Vehicle Code':
count = 0
for y in x.Values:
if y.Allowed == True:
count = count + 1
if count == 1:
for y in x.Values:
if y.Allowed == True and y.IsSelected == False:
y.IsSelected = True
x.Access = AttributeAccess.ReadOnly
else:
x.Access = AttributeAccess.Editable
Request clarification before answering.
Please do check any events attached to script & execution and other rules affecting at Product Level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.