Validate is not working in Mappig form (8601)?

vaxo_jjvaxo_jj Member Posts: 54
There is a check box "ValidateInsertModify" on Mappig form (8601) - which probably should validate all insertions into the table. But it seems that is does not work, for example, when I try to import lines in Item journal it is not sufficient to import Date, qty, item no etc. For Universal Excel Importer - which is available in download section at this site, these fields are sufficient.

Is there anything that I should do to validate data imported using this tool?

Comments

  • kinekine Member Posts: 12,562
    I am not sure, but I think that this option just set that INSERT and MODIFY is called with TRUE parameter (it means that it doesn't validate but just clal the OnInsert and OnModify). But you can easilly modify the code importing the data to call the VALIDATE instead just assigning the value.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ShedmanShedman Member Posts: 194
    Kine is correct.

    All you have to do is change the function ImportValue.
    Change
    FieldReference.VALUE := ValueAs...;
    
    to
    FieldReference.VALIDATE(ValueAs...);
    

    You might want to consider adding a boolean-field to the mapping lines and do the validation based on that field.
Sign In or Register to comment.