cancel
Showing results for 
Search instead for 
Did you mean: 

which event when purchaseorder's item has been changed?

former_member200995
Contributor
0 Kudos

hello,

     I extension the purchaseorder, I want to gain the event when i choose from item 1 to item 2, which event when puchaseorder's item has been changed?

it is not item Event: AfterModify.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200995
Contributor
0 Kudos

Hi Fred,

     I add a field to purchaseorder display screen, how can I set the value of this field? Thanks.

    

former_member200567
Active Contributor
0 Kudos

Hi Bin,

You can access item elements in Root-> Item -> ABSL.

There are two ways.

1. you can update all item from Root level

Root-> ABSL (aftermodidy or beforesave)

foreach(var item in this.Item)

{

     item.extField ="test";

}

2. you can update one item at a time in Item level

Root->Item->ABSL (aftermodify or beforesave)

this.extField ="test";

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     Thanks. I am sorry that I don't describe clearly.

     The fields is inbound delivery quantity, the question is when inbound, it can't activate the purchaseorder object's event, so the fields is empty.

     Any idea?

former_member200567
Active Contributor
0 Kudos

Hi Bin,

Please describe more about your scenario.

Which BO did you extend?

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     This is purchaseorder display screen, can display the order and item.

     But the item can't display the delivery quantity.

     My objective is display the delivery quantity in the item.

     So I extension the purchaseorder object, I don't know whether right or wrong? maybe wrong.

     It can add code in object's event(aftermodify or beforesave), so I do it, query the delivery quantity, and set the value of the extension fields.

     If edit the purchaseorder, it can sucessful to set the value of the extension fields.

     But in the purchaseorder's good receipt, it can't activate the purchaseorder object's event. How can I do? Thanks.

former_member200567
Active Contributor
0 Kudos

Hi Bin,

I do not recommend this but you can try.

1. Extend Inbound Delivery and enhcance beforesave event

2. In beforesave, query PurchaseOrder-Item and assign extension fields with delivered quantity

FYI:

There is another Purchase Orders work center under Inbound Logistics.

There, you can un-hide Delivered Quantity in Item table using KUT (Adaptation Mode).

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     Error:

    

former_member200567
Active Contributor
0 Kudos

Hi Bin,

Yes, that's why I do not recommend.

It is because of the Purchase Order status.

The Purchase Order instance you are trying to update is in "Read Only"  mode.

Please check the second option.

There is another Purchase Orders work center under Inbound Logistics.

There, you can un-hide Delivered Quantity in Item table using KUT (Adaptation Mode).

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     Thanks, I see the scond option.

     But the user just want see Delivered Quantity in Purchase Order screen, any idea?

former_member200567
Active Contributor
0 Kudos

Hi Bin,

Sorry, I do not know any other option.

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     Another question:

     In one step inbound Delivery,"Post goods Receipt", Screen below, "Delivery Notification ID", I want to assign serial number on it. But the object event(modify and beforesave) of "inbound Delivery" can't active when the screen's button save, how can I do? Thanks.

    

former_member200567
Active Contributor
0 Kudos

Hi Bin,

Where will you get the serial number?

I think you can assign Delivery Notification ID with a value in Root-AfterModify ABSL.

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     The serial number, I want to query from inbound Delivery, and add 1.

     Which object can I add code, in the screen save, the event of object "inboundDelivery" can't run?

     Thanks.

former_member200567
Active Contributor
0 Kudos

Hi Bin,

Please try with ConfirmedInboundDelivery.xbo. And enhance Root->AfterModify absl.

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     The event of ConfirmedInboundDelivery can run when the screen save, but I can't find Delivery Notification ID in object ConfirmedInboundDelivery? I have search for a long time. Thanks .

former_member200567
Active Contributor
0 Kudos

Hi Bin,

I have no access to Cloud Application Studio right now, so I cannot confirm now. May be the name is different. If the field is PSM released, it will be available in repository explorer.

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     Could you help me for the object ID, I have search for a long time in repository explorer. Thanks a lot.

former_member200567
Active Contributor
0 Kudos

Hi Bin,

I can't find it either. You'd better raise an incident.

Best Regards,

Fred

former_member200567
Active Contributor
0 Kudos

Hi Bin,

It should be Item-> Event AfterModify.

Is there any red dot on PurchaseOrdre.xbo and the script?

Please reactivate the script and the PurchaseOrder.xbo.

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

hi Fred,

     Thanks a lot.

     It is not be item -> Event AfterModify, I have test the event, when the value on item had been change, it is the event AfterModify.

     But when I change the item No., the event AfterModify don't running .

former_member200995
Contributor
0 Kudos

hi Fred,

     I can find the event "OnRowCountChange" at the UI designer, but how can I write my code in it?

former_member200567
Active Contributor
0 Kudos

Hi Bin,

Sorry, I misunderstood.

->  I can find the event "OnRowCountChange" at the UI designer, but how can I write my code in it?

No, you cannot write any code to it.

What is your objective? Can you tell us more in detail?

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

hi Fred,

     Now, in PurchaseOrder, I just can use the ListUnitPrice, it is not include the tax.

     I extension the PurchaseOrdre object, i add the tax_price fields on it, the fields is ListUnitPrice + tax.

     My objective: When the user type in ListUnitPrice, enter, the tax_price will calulate auto.

                    When the user type in tax_price, enter, the ListUnitPrice will calulate auto.

                    Two fields link, the user just type in one ,the other don't need type in.

former_member200567
Active Contributor
0 Kudos

Hi Bin,

This can be done in Item-AfterModify. (if ListUnitPrice is just a normal element of Item node).

Item-AfterModify will have the selected row (instance).

You can then assign the value (List Price + tax) to your extension field.

FYI: Gonna go offline now.

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     When the user create item, it is no problem, when the fields is initial, auto calculate.

   

     The other side, in modify Mode, when the user change the item's ListUnitPrice or tax_price, I can't know which fields is the user changed. so I can't calculate the other fields.

former_member200567
Active Contributor
0 Kudos

Hi Bin,

You can let your codes calculate anytime there is a change in any field under Item.

Or you can add another extension field to Item and store the old value of ListUnitPrice and control your codes.

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     I choose the second, it is ok. Thank you very much.

former_member200995
Contributor
0 Kudos

Hi Fred,

    How can i read the tax code and tax rate in item's Event: AfterModify?

former_member200567
Active Contributor
0 Kudos

Hi Bin Huaung,

How about this path?

PurchaseOrder.Item.TaxCalculationItem.ItemProductTaxDetails

Best Regards,

Fred

former_member200995
Contributor
0 Kudos

Hi Fred,

     I have got the tax code on this path:TaxCalculationItem.TaxationCharacteristicsCode.content.

     But the "tax rate"  not catch. Could you help me? Thanks.

former_member200567
Active Contributor
0 Kudos

Hi Bin,

You can query and check PurchaseOrder existing data in Repository Explorer before writing codes in ABSL.  Can you pls share your codes?

Best Regards,

Fred