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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to assign values to custom fields based on a standard field available in the same table

(0) ShareShare
ReportReport
Posted on by 172

Hi There,

I have a requirement that I need to add some custom fields in SMMActivities form and already in the activities form there is some data for the standard fields available, I need to add these custom fields and update the custom field data according to available data.

So I have added custom fields in smm activities table and I'm not getting which method or event handler I need to take. I have tried with init method extension of smm activities form but unable to get the current smmactivities record because i need smm activity number to update custom fields. Please help me to achieve this.

I have the same question (0)
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    So that means you have added few custom field in a standard table and you need to update it based on the already present data. Then you need to write some custom batch job to update these records. Else if you have an entity and Excel file with required data, you can use that to update these fields.

  • Ganesh Potnuru Profile Picture
    172 on at

    Hi Bharani,

    Thanks for the suggestion.

    Need one more clarification, if I want to assign some values to these custom fields I can write code in table level init() method right? So that next time if I create a new record, data will insert in these fields right?

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    At table you have initValue method. Init is for forms.

    Yes to assign a default value you can write code at initvalue of the table. But kindly check if these default values should reflect on all forms where this table is used.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi, If this is one time activity then I would suggest to create a runnable class and write logic to update all records. If the logic is simple then you can write SQL query and save time of code deployments.

    However, if your requirement is to populate values of the custom fields always based on existing data then table method initvalue as suggested by Bharani. If not works then please provide need more details of the requirement

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 628 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 501 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 437

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans