Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Hide information for some field in Data Entity ?

(2) ShareShare
ReportReport
Posted on by 351
 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.
  • Suggested answer
    Navneeth Nagrajan Profile Picture
    1,301 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
    4,102 Moderator 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
    6,407 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
    351 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
    225,155 Moderator on at
    Hide information for some field in Data Entity ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,860 Test role Public

#2
Ludwig Reinhard Profile Picture

Ludwig Reinhard Microsoft Employee

#3
Martin Dráb Profile Picture

Martin Dráb 225,155 Moderator

Leaderboard

Product updates

Dynamics 365 release plans