web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Category name on all forms with category id

(0) ShareShare
ReportReport
Posted on by 1,215

Hi,

The client has asked to show the project category name field on all the forms where category id is displayed.

This is because they have category id in English and category names in the national language.

The column should be filterable and sortable if in a grid.

For this I added a data source ProjCategory to the form, specified joinsource and set join mode to outerjoin, and defined a joinsource, set no to edit, create, delete and insert if empty. Then, I added the name field beside category id colum.

But when I tried to create a records eg. in the project Hours form, it would give an error for empty category group id.

ProjJournalTable does not have a category group id field, it is in the ProjCategory table.

So, why is it trying to create a record in ProjCategory table when I have disabled creation of records and if this is not the right approach, then what else I should try?

Thank you for your time!

With best regards,

Abhinay

I have the same question (0)
  • GirishS Profile Picture
    27,827 Moderator on at

    Hi Abhinay Tharwal,

    Have you checked the existing category has category group assigned?

    I guess it's not there. category group id is mandatory in ProjCategory table.

    Work around will be creating a view and add that view as DataSource to the form.

    Thanks,

    Girish S.

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi Girish,

    Thank you for your reply!

    The existing records have category group id.

    It is not an error about the existing records. It is trying to create a new record in the ProjCategory table and failing in the validateWrite() method.

    These are standard forms and a replacement of the existing datasources would not be a feasible or viable option as we have identified over 36 forms so far and increasing.

    //BR, Abhinay

  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at

    Setting the Allow edit and allow create property to No won't restrict creation of records.

    It depends on "Optional record mode" property on the DataSource since you have the set the join source as Outer join.

    But the optional record mode property will be enabled only if the "Data source change group mode" property on the form must be "ImplicitInnerOuter".

    Since it's an extension form you cannot change the "Data source change group mode" property. So, the workaround will be creating view - Add Projcategory as datasource - Add that view to a form datasource.

    Thanks,

    Girish S.

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi,

    Okay, then I will create a view.

    Thank you for your reply!

    //BR, Abhinay

  • GirishS Profile Picture
    27,827 Moderator on at

    Another option will be writing COC for validateWrite method of ProjCategory datasource and set its return type to true.

    It will bypass the validation but double check whether its creating new record in ProjCategory table.

    If it creates new record without mandatory fields then there will be orphan records in ProjCategory table which is not recommended.

    Thanks,

    Girish S.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans