Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Set value in datasource field whe init the form

Posted on by 375

Hello every one i need to set adefault value to the for when init it i'm trying to write this code prodParmReportFinished.Unit="50"; in init value method but not working8080.2.png

*This post is locked for comments

  • AhmedSaeed Profile Picture
    AhmedSaeed 375 on at
    RE: Set value in datasource field whe init the form

    i debug it but no thing happend i solve the proble by write the cod in (init) method in the table

  • AhmedSaeed Profile Picture
    AhmedSaeed 375 on at
    RE: Set value in datasource field whe init the form

    yes it is the same field and i debug it but no thing happend i solve the proble by write the cod in (init) method in the table

  • Verified answer
    Mark Boy2 Profile Picture
    Mark Boy2 490 on at
    RE: Set value in datasource field whe init the form

    As Nikolaos Mäenpää said , Did you debug your code ?

    and  your form field properties datasource option whether you have a bound data source

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Set value in datasource field whe init the form

    Are you sure that the field that you see in the form is this same field?

    Also, like I asked previously, did you debug it? What did you learn from it when you debugged it?

  • AhmedSaeed Profile Picture
    AhmedSaeed 375 on at
    RE: Set value in datasource field whe init the form

    Hi Mark Boy2 i create new project like you do and it working but when i put my cod in the (Initvalue ) method in prodparmreportfinid not working 0243.33.png

  • Peter John Profile Picture
    Peter John 286 on at
    RE: Set value in datasource field whe init the form

    Hi, Ahmed.

    You should mention your data source under in the form -> grid control -> DataSource property

    2605.Que.png

  • Mark Boy2 Profile Picture
    Mark Boy2 490 on at
    RE: Set value in datasource field whe init the form

    _AE5FE14FFE5647725F00_20190627152255.png

  • Mark Boy2 Profile Picture
    Mark Boy2 490 on at
    RE: Set value in datasource field whe init the form

    add information :  try to write your code in the table overwriter-> initValue method or insert method ?

  • Mark Boy2 Profile Picture
    Mark Boy2 490 on at
    RE: Set value in datasource field whe init the form

    thanks,I see it. 

  • AhmedSaeed Profile Picture
    AhmedSaeed 375 on at
    RE: Set value in datasource field whe init the form

    Hi Mark Boy2 it didn't work

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans