Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Update Custom Fields on standard table

(0) ShareShare
ReportReport
Posted on by
Hi all,
 
I am trying to update DirPerson table by code/ I am trying to update the value  of some custom fields that are added by Extension/  but the update is failed and an error appear 
Cannot edit a record in People (DirPerson). Data update is not allowed on a field that has not been selected
 
Any hint?
 
Regards,
Waed
 
  • Farman Ameer Profile Picture
    Farman Ameer 17 on at
    Update Custom Fields on standard table
    You have to select record before update.
     
    DirPerson  dirPerson;
    select firstonly forUpdate dirPerson
         where ///YourCondition///
     
    if(dirPerson)
    {
       ttsbegin;
       dirPerson.YOURFIELD = "YourValue";
       dirPerson.update();
       ttscommit;
    }
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Update Custom Fields on standard table
    Please share your code here. Also please attach screenshot of the select statement buffer.
  • Suggested answer
    Komi Siabi Profile Picture
    Komi Siabi 12,759 Most Valuable Professional on at
    Update Custom Fields on standard table
    Hello,
     
    The error says you are obviously not selecting the record before the update. Here a sample code for update.
     
  • Layan Jwei Profile Picture
    Layan Jwei 7,634 Super User 2025 Season 1 on at
    Update Custom Fields on standard table
    Hi User,

    can you please share with us your code so that we can help you.

    Thanks,
    Layan Jweihan

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans