PLM 360 General

Reply
Active Contributor
ForrestJudd
Posts: 37
Registered: ‎04-28-2008
Message 1 of 3 (122 Views)

Script behavior change with updates - scripts broken

122 Views, 2 Replies
11-19-2012 02:33 PM

Something appears to have changed in the November update that has broken some of our functionality.  It has also altered some of the default tenant functionality.  The underlying change appears to be related to when item detail fields are populated during item creation.

 

The clearest example of this behavior change is with the default tenant's RFQ workspace.  Prior to the November update, when you cloned an RFQ, the new RFQ retained the old RFQ number.  Ideally this is to tag multiple RFQs for the same request to different vendors with the same name.  I always thought this was desired behavior, as evidenced by the On Creation script in the default tenant for the RFQ workspace:

 

/*
Setup:      Needs RFQ_NUMBER field to write to
Purpose:    creates a new RFQ number, only for new, not cloned
Method:     If existing field is null, generate new number
Result:
*/
var RFQSeqID = '332';
var seqGenator = loadItem(RFQSeqID);

if(item.RFQ_NUMBER === null)
{
    //set the new number
    var newRFQNumber = nextSeqNumber(RFQSeqID);
    if(newRFQNumber !== null){
        item.RFQ_NUMBER = newRFQNumber;
    }
}//end if

 This script no longer works.  Here's what happens now.  I start with a newly created RFQ:

 

OriginalChangeLog.png

 

Notice the script runs during creation and assigned a new RFQ number - RFQ-100003.  I then clone the RFQ.  Prior to this weekend, it would have the same RFQ number.  Here's what I get now:

 

CloneItemDetails.png

 

I modified the comments during the creation of the clone.  Notice that it was given a new RFQ number.  Look at its change log:

 

CloneChangeLog.png

 

It's showing the RFQ Number field as having no value, but that's definitely not the case.

 

This has currently broken one of my important scripts.  I have scripting that takes grid information from cloned RFQs and upon RFQ approval updates the original master RFQ with vendor-supplied information.  To accomplish this I have a picklist on the RFQ item details that links back to itself only if the RFQ is not a clone.  This way each cloned RFQ has a link back to the RFQ that spawned it.  

 

I'm really not sure what's going on here.  I have other scripts that are acting on new item creation where some item fields ARE populated to start with.  Take this example:

 

SomeFieldsOK.png

 

Notice the GRIDFIELD item detail field started with a value.  The above record was created via script that invokes the createNewItem library function.  That funtion takes in an array of item detail fields and values, and the GRIDFIELD item detail field was included in that array with the call to createNewItem.  RFQ Number and Master RFQ was not, however, and (as expected in this case) they were assigned a value.  Now when I clone the above RFQ I get this:

 

SomeFieldsOK.png

 

The change log at least reports that those item detail fields suddenly had no value again.  Was this an intended change?  If so, what is now the recommended way to get back to the default functionality for RFQs where cloned RFQ records share the same RFQ number as the original record?

 

 

Product Support
michelle.stone
Posts: 220
Registered: ‎02-21-2012
Message 2 of 3 (114 Views)

Re: Script behavior change with updates - scripts broken

11-19-2012 03:21 PM in reply to: ForrestJudd

Forrest - I'll create a case and start investigating this for you.  I'll circle back with the communtity once we know more.  Thanks for reporting.

 

Michelle



Michelle Stone
PLM Product Manager
Autodesk, Inc.
Employee
jared.sund
Posts: 67
Registered: ‎11-04-2011
Message 3 of 3 (105 Views)

Re: Script behavior change with updates - scripts broken

11-19-2012 08:03 PM in reply to: ForrestJudd

Forrest,

 

From my quick testing, this issue appear to only apply to field with editability set to false.  I'll address this with development first thing, and get this resovled quickly.

 

-Jared

Jared Sund
Sr. Product Line Manager, Product Lifecycle Management
Autodesk, Inc.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Ask the Community