Skip to main content
Dynamics 365 Community / Forums / Finance forum / Hide information for s...
Finance forum
Suggested answer

Hide information for some field in Data Entity ?

editSubscribe (2) ShareShare
ReportReport
Posted on by 302
 Hi everyone,
 
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.
 
Can I get some advice how to achieve this ?
 
Thanks.
Attachments
  • Suggested answer
    Navneeth Nagrajan Profile Picture
    Navneeth Nagrajan 1,205 on at
    Hide information for some field in Data Entity ?
    Hi,

    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.
  • Layan Jwei Profile Picture
    Layan Jwei 2,960 Super User on at
    Hide information for some field in Data Entity ?
    Hi Teevo,

    is the condition the same for all fields?
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 4,123 User Group Leader on at
    Hide information for some field in Data Entity ?
    Hi @Teevo,
     
    as Martin said, the perfect solution is to use computed columns and virtual fields.
    yes, you must create fields one by one.
     
    Best regards,
    Mohamed Amine MAHMOUDI
     
  • Teevo Profile Picture
    Teevo 302 on at
    Hide information for some field in Data Entity ?
    Hi Martin,
     
    Just to confirm, for the computed column, means we should create one by one for those field that we want to make it blank ? 
    May I ask if there is another way ? since my fields is quite large.
     
    Thanks
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 222,987 Super User on at
    Hide information for some field in Data Entity ?

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Demystifying Copilot with Sundar Raghavan

Sundar explains how Copilot for Service is meant to function separately...

Business Process Guidance Badges and New…

The Microsoft Success by Design is the framework for implementing Dynamics 365…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,266 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,987 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans