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

Product receipt - Number seq

(1) ShareShare
ReportReport
Posted on by 23

Hi All,

I'm currently working on generating a custom number sequence for product receipt in purchase orders.

I've mapped the number sequence into the NUM field in PURCHPARMTABLE, but unfortunately, it's not functioning as expected. During debugging, I consistently receive a number sequence value, but it's not populating the NUM field.

If anyone has insights or suggestions on resolving this issue, I'd greatly appreciate your assistance.

Thank you.

 
 
 
 
 
I have the same question (0)
  • Mohamed Amine Mahmoudi Profile Picture
    26,826 Super User 2026 Season 1 on at
    Hi,
     
    can you share with us the code ?
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • DP-27040853-0 Profile Picture
    23 on at
    This is the code I wrote in PURCHPARMTABLE. While debugging, I confirmed that I am receiving the value of the number sequence. However, it is not being displayed in the PURCHEDITLINES form.
     
     
    public void initValue()
        {
            Num num;
            NumberSeq numberSeq;
            numberSeq = numberSeq::newGetNum(purchparameters::numRefproductReceipt());
            num  = numberSeq.num();
            numberSeq.used();
            next initValue();
            this.Num = num;
        }
  • Suggested answer
    Rachit Profile Picture
    4,015 User Group Leader on at
    Probably your value assignment is getting reset by any standard logic and you will need to debug the process to find it out. Alternatively, you also try extending the insert method of the table.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,826 Super User 2026 Season 1 on at
    Hi,
     
    Try to override the create method on datasource on your form
    public void create(boolean _append = false)
    {
        super(_append);
    
        yourtable.Num= NumberSeq::newGetNum(purchparameters::numRefproductReceipt()).num();;
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • DP-27040853-0 Profile Picture
    23 on at
    I tried both scenarios insert method and create method. it's not working
  • Mohamed Amine Mahmoudi Profile Picture
    26,826 Super User 2026 Season 1 on at
    Hi,
     
    can you share with us all steps ?
     
    BR,
    Mohamed Amine MAHMOUDI
  • DP-27040853-0 Profile Picture
    23 on at

    The user doesn't want to manually enter values in the Product Receipt, so they requested a custom number sequence for that purpose.

    I created a custom number sequence and successfully tested it by assigning the number sequence value to a string variable.

    However, the issue arises when tracking the Product Receipt field in the PURCHEDITLINES form, which is mapped to the NUM field in PURCHPARMTABLE.

    Although I attempted to assign the number sequence value to the NUM field using methods such as initvalue(), create(), and insert(), the Product Receipt field continues to have a null value.

    I'm unsure where the mistake lies in this process.

  • André Arnaud de Calavon Profile Picture
    306,846 Super User 2026 Season 2 on at
    Did you check the comment from Rachit? He mentioned that the value might have been overwritten after the number sequence value was set to the NumberSeqTable.Num field in your code extension. 
  • DP-27040853-0 Profile Picture
    23 on at
    I debugged the standard code, but no value was assigned to that field."
  • André Arnaud de Calavon Profile Picture
    306,846 Super User 2026 Season 2 on at
    Hi,
     
    So you mean to say that the num variable did get a value assigned, but in the same method this.Num was not getting the same value? 

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
SajeedMullaji Profile Picture

SajeedMullaji 760

#2
Martin Dráb Profile Picture

Martin Dráb 330 Most Valuable Professional

#3
CU10121822-0 Profile Picture

CU10121822-0 310

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans