1049
Points
Questions
25
Answers
144
-
You’ll find that you do have available Rev specific fields on the Affected Items tab of a change order, but you may have to restructure how you do things.
For example, a field I call “Customer Notified Y/N” which uses PAGE_TWO.LIST03 should be converted and use REV.LIST03 Attribute instead. That makes that field rev controlled. Elsewhere on this site there’s a script someone shared that updates an Item based off of the affected items tab when releasing an ECO. Check that out too (“Groovy code to update an item” I believe is the tread name).- 1770 views
- 3 answers
- 0 votes
-
I recommend one or both of these options as well:
1) disable your email notifications for the Test Database (either specific emails themselves or system wide emails in the server settings).
2) mass update the email addresses for all of the remaining active users in Test Database to your own email address or blank.Not sure how often you refresh your test database with a copy of production, but I recommend inactivating most of the users in test for this same reason.
- 1900 views
- 4 answers
- 0 votes
-
I’ve gotten something similar to work. This script nullifies a value during a Save As.
import com.agile.agileDSL.ScriptObj.*;
import com.agile.agileDSL.ScriptObj.AgileDSLException;
import com.agile.agileDSL.ScriptObj.IBaseObjectScriptObj;
import com.agile.api.*void invokeScript(IBaseScriptObj obj) {
String newNumber = obj.getNewNumber()
IAgileSession session = obj.getAgileSDKSession();
IItem newItem = (IItem) session.getObject(ItemConstants.CLASS_PARTS_CLASS, newNumber);try{
IItem item = (IItem) session.getObject(IItem.OBJECT_TYPE, newNumber);
item.setValue(ItemConstants.ATT_PAGE_TWO_LIST23, null);}catch (Exception e) {
obj.logMonitor( e.getMessage() );
}obj.logMonitor(“Successful nullify List value” );
}- 2344 views
- 4 answers
- -1 votes
-
- 2260 views
- 4 answers
- 0 votes
-
- 1833 views
- 2 answers
- 0 votes
-
RE: Is there any custom PX sample code available, to checkout/checkin the file from Attachments tab?
There’s some examples of the main bits over in the Agile 9.3.X SDK Developer Guide – Building APIs about how to do that. Are you referring to a specific row or through a specific event?
Basically, the script would:
1. Add import statements
2. Add try block
3. Get Change Order number
4. Get Attachments tab table
5. Check in filesUnless someone here has a specific script they have to share, take bits and chucks of code from 9.3.6.’s guide for building APIs from Examples 14-18, 7-3, 7-4, 14-10, and even 14-9.
- 1454 views
- 1 answers
- 0 votes
-
Well, the “ManufacturerPartsConstants” is probably the key. When you say, “Page Two MultiList”, are you referring to the Page 2 Attribute within the Manufacturer’s Part class itself? (Base ID 2090 in my system) Or the Change Order/MCO redlines? Or item table itself?
I ask because the ManufacturerPartsConstants doesn’t have ATT_Page_Two_Multilist01 as one of its legal values. Instead, use something along the lines of <change.setValue(1575, null); > , <String division = item.getValue(1004)>, or <item.setValue(1279, “Each”)> to set or get a value based off of the Base ID instead.
Let us know if you need further clarification.
- 2260 views
- 4 answers
- 0 votes
-
Try something like this, but modify it for the specific base ID of what you’re looking at getting.
(This is mine in the case of a SaveAs event, works to update Item values based off of Product Line)try{
IItem item = (IItem) session.getObject(IItem.OBJECT_TYPE, newNumber);
String division = item.getValue(1004) //get Product Line of created item
// then I add a few if statements to my script
item.setValue(2029, “TBD”) //update US HTS code to TBD
}catch…- 2260 views
- 4 answers
- 0 votes
-
- 4291 views
- 4 answers
- 0 votes
-
- 1804 views
- 3 answers
- 0 votes