Thank you very much to everyone for their support.
I solved the problem. I was able to wrote the value in the field I added to the ISSUECURRENTITEM table to the MATUSETRANS table.
As the Object Launch Point, it is necessary to create and run the automation script before saving it. Also, I have shown the quantity class as a class in the SALE field.
Launch Point: You must Before Save
The working code is below.
owner= mbo.getOwner()
if owner and owner.getRecordMboName()=="INVENTORY":
issueitemMbo=owner.getMboSet("ISSUECURRENTITEM").getMbo(0)
if issueitemMbo:
mbo.setValue("ITIN1",issueitemMbo.getDouble("SALE"))
mbo.save()
logger = service.getLogger("maximo.mxdev")
#logger = MXLoggerFactory.getLogger("maximo.mxdev")
logger.info("RUNNING STEP")
------------------------------
Aliriza Canakci
Is Merkezleri Yönetim ve İşletim A.S
------------------------------
Original Message:
Sent: 06-07-2022 09:17
From: Travis Herron
Subject: Issue current item automation script problem
Also, I'd be careful about using ITIN1 as your destination. I'm pretty sure some legacy coding is still in place, that has behind-the-scenes data crossovers from
ITEM.IN19 --> PRLINE.RLIN1 --> POLINE.PLIN1 --> MATUSETRANS.ITIN1
and
INVOICELINE.INVOICELIN1 --> INVOICECOST.ICT1 --> MATUSETRANS.ITIN1
and was used in the Oracle Financials integration adapter.
------------------------------
Travis Herron
Pensacola Christian College
Original Message:
Sent: 06-06-2022 08:42
From: Aliriza Canakci
Subject: Issue current item automation script problem
Hello ,
Thank you for your support Danielle.
We have set the script as an object. We have added a field to the Dialog screen. I want the value entered in this field to be written to the ITIN1 field in the matusetrans table.The Issuecurrentitem table is a temporary table. We choose the matusetrans table as the launch point object. After saving, we want the operation to take place.
------------------------------
Aliriza Canakci
Is Merkezleri Yönetim ve İşletim A.S
Original Message:
Sent: 06-06-2022 08:15
From: Danielle Newhouse
Subject: Issue current item automation script problem
What launch point are you using for this script? Object, action, etc.
Are you expecting the field to be set after clicking "OK" on the dialog (so when the item is issued)? What happens instead - is there an error or does the field just not get set?
------------------------------
Danielle Newhouse
Original Message:
Sent: 06-03-2022 11:19
From: Aliriza Canakci
Subject: Issue current item automation script problem
Hello,
How can we write the value in the field I added in the material output operation to the field in the matusetrans table?
owner= mbo.getOwner()
if owner and owner.getRecordMboName()=="INVENTORY":
issueitemMbo=owner.getMboSet("ISSUECURRENTITEM").getMbo(0)
if issueitemMbo:
mbo.setValue("MATUSETRANSFIELD", issueitemMbo.getString("ISSUECURRENTITEMFIELD"))
We did the following steps. But the code is not working
1) Add your fields to ISSUECURRENTITEM object using Database configuration
2) Go to application designer and open Inventory (INVENTOR) application.
3) Click 'Edit Dialogs' from the toolbar
4) Open Dialog - ISSUE (Label:Issue Current Item)
5) Add the field you configured in the database to the dialog as you like.
#Customizations
------------------------------
Aliriza Canakci
Is Merkezleri Yönetim ve İşletim A.S
------------------------------