Activate SetHideValidationDialog by recordref?

rocopsarocopsa Member Posts: 38
Dear experts,

I'm writing an import function of Sales Order by using recordref instead of record. The import is fine and doing its job, but, those message dialogs come out during the process.

I know that those can be avoided by "SetHideValidationDialog" function in both "Sales Header" and "Sales Line", so, how could I activate them in recordref? Or, is there any suggestions to avoid those dialogs?

Thanks in advance for your advices. :D

Comments

  • rmv_RUrmv_RU Member Posts: 119
    You can use single instance codeunit to set and get the SetHideValidationDialog property.
    Sample Scenario:
    1. Create single instance codeunit (si) and functions (SetHideValidationDialog and GetHideValidationDialog)
    2. Add following code to the SalesHeader.InitRecord function:
    if not HideValidationDialog then
    HideValidationDialog:=Si.GetHideValidationDialog;
    3. Set the si.SetHideValidationDialog(true) before calling import routline.
    Looking for part-time work.
    Nav, T-SQL.
Sign In or Register to comment.