7

Hello,


DataTransfer datatype needs SetDestinationFilter method.


For example, we have extended VAT Entry table with new field LBC Bill-to/Pay-to Name. Depending on Type field the name can come either from customer or from vendor.


Clear(DataTransfer);

DataTransfer.SetTables(Database::Vendor, Database."VAT Entry");

DataTransfer.AddJoin(Vendor.FieldNo("No."), VATEntry.FieldNo("Bill-to/Pay-to No."));

DataTransfer.AddDestinationFilter(VATEntry.FieldNo(Type), '%1', VATEntry.Type::Purchase); // this is missing

DataTransfer.CopyFields();


Clear(DataTransfer);

DataTransfer.SetTables(Database::Customer, Database."VAT Entry");

DataTransfer.AddJoin(Customer.FieldNo("No."), VATEntry.FieldNo("Bill-to/Pay-to No."));

DataTransfer.AddDestinationFilter(VATEntry.FieldNo(Type), '%1', VATEntry.Type::Purchase); // this is missing

DataTransfer.CopyFields();


Thanks.


Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team