Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Auto numbering for a custom Object

(0) ShareShare
ReportReport
Posted on by 130

Hi,

I have a customization requirement in Cash manager module where i need to get the details like Party name, mode of payment & Receipt number in to the system, along with the usual entries in the "Details" section in the Transactions screen..

Name & mode of payment can be entered by the user but i want the Receipt number to be auto generated by the  system..

Can anyone kindly tell me how this can be done?


 

 

 

 


*This post is locked for comments

  • KenF58 Profile Picture
    1,035 on at
    RE: Auto numbering for a custom Object

    Custor should read Customer!!!

  • Suggested answer
    KenF58 Profile Picture
    1,035 on at
    RE: Auto numbering for a custom Object

    This code finds the last custid, adds 1 to the value and sets the result in the CustID field on the customer maintenance screen.

    I guess you could do something similar...

    Private Sub btnNext_Click()

    Dim SqlStr$, nextCustid$

    SqlStr = "UK%"

    SqlStr = "select max(CustId) from Custor where Custid like" + SParm(SqlStr)

    Call sql(c1, SqlStr)

    serr1 = SGroupFetch1(c1, bCustMax, LenB(bCustMax))

    Call IncrStrg(bCustMax.CustId, 8, 1)

    nextCustid = Trim(bCustMax.CustId)

    ' Call SetStatusBarText("Next UK Customer is " + nextCustid, "")

    serr = SetObjectValue("cCustid", nextCustid)

    End Sub

  • Community Member Profile Picture
    on at
    RE: Auto numbering for a custom Object

    From which screen do you enter the payment?

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

#1
Community Member Profile Picture

Community Member 136

#2
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 102 Super User 2025 Season 1

#3
REUser Profile Picture

REUser 8

Featured topics

Product updates

Dynamics 365 release plans