web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • André Arnaud de Calavon Profile Picture
    297,207 Super User 2025 Season 2 on at
    Product receipt - Number seq
    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? 
  • Community member Profile Picture
    23 on at
    Product receipt - Number seq
    I debugged the standard code, but no value was assigned to that field."
  • André Arnaud de Calavon Profile Picture
    297,207 Super User 2025 Season 2 on at
    Product receipt - Number seq
    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. 
  • Community member Profile Picture
    23 on at
    Product receipt - Number seq

    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.

  • Mohamed Amine Mahmoudi Profile Picture
    26,292 Super User 2025 Season 2 on at
    Product receipt - Number seq
    Hi,
     
    can you share with us all steps ?
     
    BR,
    Mohamed Amine MAHMOUDI
  • Community member Profile Picture
    23 on at
    Product receipt - Number seq
    I tried both scenarios insert method and create method. it's not working
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,292 Super User 2025 Season 2 on at
    Product receipt - Number seq
    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
  • Suggested answer
    Rachit Profile Picture
    4,015 User Group Leader on at
    Product receipt - Number seq
    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.
  • Community member Profile Picture
    23 on at
    Product receipt - Number seq
    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;
        }
  • Mohamed Amine Mahmoudi Profile Picture
    26,292 Super User 2025 Season 2 on at
    Product receipt - Number seq
    Hi,
     
    can you share with us the code ?
     
    Best regards,
    Mohamed Amine MAHMOUDI

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans