I have Sale Slip Header(Custom Entity) where user can print Sale Slip(Word Template) and Sale Slip Header consist multiple Sale slip Lines but the requirement is that every Sale Slip Line must have Serial Number. For Example I have purchased 3 items and all 3 items details present in Sale Slip Line, Now each item serial number(1,2 or 3) should be generated so that Multiple sale slip line Item can identify in Printed Sale Slip.
*This post is locked for comments
Nice I try to implement this logic . Thank You Shidin :)
Sorry, let me be more clear, you can have a pre-plugin on create of Sale Slip line item.
The plugin does the following:
1. Checks if the Sale Slip item has a Sale Slip Header value.
2. Retrieve the 'Serial Number' latest created Sale Slip item that is associated to the Sale Slip Header retrieved in step 1.
3. Add +1 to this number and pass this number into the 'Serial Number' of the Sale Slip line item getting created.
If no records were retrieved in step 2, set serial number to '1'. (initial number)
The pros of this solution is:
1. Simple plugin to get serial numbers in order.
2. Do not have to store the number anywhere as we are relying on the last created Slip line item +1 to give the next number.
Cons:
1. Users must not be allowed to manually edit this serial number.
2. Does not cover scenarios where you update the Sale Slip header on a Sale slip line item. (This might not even be possible in your system)
Please let me know if you need more details.
Cheers!
Yes Auto Numbering can be implemented easily but Auto numbering sequence does not start again with Initial number . it always increment by 1.
A bit confused here as the title and the question seems different and you mentioned Word Template as well,
Either way, why don't you try implementing a simple auto-number for your Sale Slip line item?
Let me know if you need more details on the auto-numbering.
PS: Also mention your CRM version.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156