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

Notifications

Announcements

Community site session details

Community site session details

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

Initialize Product Receipt Value

(0) ShareShare
ReportReport
Posted on by 126
Hello Everyone,
 
I have one requirement, i want to initialize Value of Product Receipt as soon as i will click on Product Receipt form. can anyone help me where exactly we have to write code for this. i have tried various approach by creating COC or EventHandler. But its not working. Can anyone suggest me for which Object's Method we have to create COC Or EventHandler.
 
FormName : PurchEditLines
Table : PurchParmTable
Field : Num
I have the same question (0)
  • D365_FO_Technical_Te Profile Picture
    126 on at
    Hi,
     
    can anyone help me on this as i am still facing this issue
  • D365_FO_Technical_Te Profile Picture
    126 on at
    Hi Bharani,
    Just for Testing Purpose, i wrote code at both place before and after Next and initializing random Value to check whether it will work or not. Please check and let me know.

    [Extensionof(FormDataSourceStr(PurchEditLines, PurchParmTable))]
    final class PurchEditLine_Extension
    {
        public void initValue()
        {
            PurchParmTable    PurchParmTableloc = this.cursor();
            PurchParmTableloc.Num = 'afag';
            next initvalue();
            PurchParmTableloc.Num = '2afag12';
        }
    }
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Can you send your code?
  • D365_FO_Technical_Te Profile Picture
    126 on at
    Hi Mohit,
     
    I have already tried by creating COC of InitValue Method of DS, but its not working
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at
    Hi, Have you tried extending initValue method of PurchParmTable datasource of PurchEditLines form. You can check DocumentStatus and initialize value in Num field for Product Receipt.
     

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

News and Announcements

Season of Giving Solutions is Here!

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
Abhilash Warrier Profile Picture

Abhilash Warrier 843 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 288 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans