Thursday, January 9, 2020

How to display warehouse based on the Site selected using X++ in D365FO

[FormControlEventHandler(formControlStr(EcoResProductParameters, KMTWarehousePlaceholder), FormControlEventType::Lookup)]
    public static void KMTWarehousePlaceholder_OnLookup(FormControl sender, FormControlEventArgs e)
    {
        FormControlCancelableSuperEventArgs formControlCancelSuper = e as FormControlCancelableSuperEventArgs;

        EcoResProductParameters ecoResProductParameters = sender.formRun().dataSource(formDataSourceStr(EcoResProductParameters,EcoResProductParameters)).cursor();

        if (ecoResProductParameters.KMTSitePlaceholder)
        {
            InventLocation::lookupBySiteIdAllTypes(sender, ecoResProductParameters.KMTSitePlaceholder);
        }

        formControlCancelSuper.CancelSuperCall();
    }

2 comments:

  1. I never thought that I will be qualify for a loan that Officer Pedro and his loan company granted me which was very smooth and transparent in every conversation that we make through the loan process, I will once again thank him and his loan organization for a job well done by offering me a loan of 22 million Euro with the low rate of 2% annual return they are genuine and loan register company with simple terms and conditions.Contact the loan company through pedroloanss@gmail.com

    ReplyDelete

How to enable the dimension fields based on the Item selected on the form.

[Form] public class KMTShipFromWarehouses extends FormRun {     InventDimCtrl_Frm_EditDimensions        inventDimFormSetup;     /// ...