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

Notifications

Announcements

No record found.

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

I have the same question (0)
  • Community Member Profile Picture
    on at

    From which screen do you enter the payment?

  • Suggested answer
    KenF58 Profile Picture
    1,035 on at

    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

  • KenF58 Profile Picture
    1,035 on at

    Custor should read Customer!!!

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans