About data entity, can we make some fields blank for string or zero for integer based on certain condition ?
Is there any method we can use to put the condition ?
The intention is to use this data entity in OData, so when it is called, some information in the field needs to be blank based on certain condition. But we can't use OData query filtering on this case, so wondering how to do it by code.
Agree with Martin and Mohammad Amine. You can refer to some same examples - 1. For computed columns:
Refer to PurchaseLineDiscountAgreementEntity - vendorAccountNumberComputedColumnDefinition; itemNumberComputedColumnDefinition
2. For virtual fields:
Refer to CustomerPaymentJournalLineSettledInvoiceEntity - invoiceAccount() method.
Hope this helps. Happy to answer questions, if any.