Solved

When Copying PO - don't want custom fields to copy

  • 25 June 2021
  • 2 replies
  • 227 views

Userlevel 5
Badge +9

We are running Apps10 UPD10

 

We used custom fields to add fields to track supplier specific tracking info during the purchasing process.  The challenge is, if we use the “Copy Order” function to duplicate the order, the custom field values are also being copied over, so then we have to clear them.

Is there a way to indicate “don’t include this custom field” in the copy?  Either in the copy step or in the custom field?

icon

Best answer by Imal Thiunuwan 25 June 2021, 06:52

View original

This topic has been closed for comments

2 replies

Userlevel 6
Badge +16

Hello @jhooperyan,

You can create a custom event that is triggered when new lines are saved for the new PO (when you are copying a purchase order). But, if you have any read only custom fields which are not editable, you have to change them into editable ones (Otherwise it won't let you to remove the values by the event). Also you need to consider if those custom fields are linked to other windows as well. If they are linked, the solution may be affect to other windows as well.

But, there can be a delay happen to remove the custom field values from the copied PO (New PO) as the event action (Link to custom event) needs to run as a background job (The reason for this delay is the time that it takes to finish the background job)

I'm not sure if there is another possible way is available to implement this requirement, as we can not override the insertion function using configurations. So what you can do is update the record with correct values after the insertion using a custom event.

Hope this explanation is clear for you.

Cheers!

Userlevel 5
Badge +9

That makes sense, but it’s less than ideal.  I’ll have to use a deferred job on the custom event to do the update on records.  I try to avoid those on create, since that means my users risk getting a “record is changed” error if they keep working on the order after that initial save.  But we’ll try it.