web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

Transfer Order Shipment Validation in Extension COC

Sheikh Sohail Profile Picture Sheikh Sohail 6,125


Yesterday, I received the requirement to put some custom validation during transfer order shipment.

As everyone know that in D365FO over-layering is not allowed anymore. So i have to perform this task in extension.

In extension i have two way to perform this task.

1st-Way
Create the form extension and replace the shipment menu item with my custom menu item and after performing my successful custom validation call original menu items.

2nd-Way
Create extension class of  InventTransferUpdShip and override the check method using COC pattern and perform our custom validation.

I decided to go with COC and following are the code snippet i have write 



[ExtensionOf(classstr(InventTransferUpdShip))]
final class SLD_InventTransferUpdShip_Extension
{

    boolean validate()
    {
        
        boolean ok = next validate();

        
             ok=ok && this.validateTransferOrderShip(ok);
        
        return ok;
    }


  public booleanvalidateTransferOrderShip(boolean flag)

    {
        // write your validation here... 

     return flag;
  }

}

This was originally posted here.

Comments

*This post is locked for comments