Cannot create incrementing or adding Numerical fields

Version 7.10.22

Sugar Version 6.5.25 (Build 344)

Hey there,

I am trying to add a field in the contracts PDF - Template section that functions just like the quote number field in the quoting section.

The exact field I am replicating is the quote number or $aos_quotes_number. I replicated the field in studio>contracts>Add Fields and I used the integer value. However, this integer value did not seem to auto increment. For this attempted, it did not print anything at all and I’m not sure how to proceed.

Also, I would like to create a integer value that added together total hours. I followed the same procedure as above, but I added a field that allow the user to input a value of hours per product. I added a value to the product and the number showed below each product, but did not add together.

Any help would be greatly appreciated

Adding fields from Studio is just part of the work. You need to add some logic either via workflow or via logic hook to add the required functionality.

Check this post for a sample on how to add auto-incremental numbers based on a SQL request:

This can be done via before save logic hook for a single field / module or even multiple modules.
But if this needs to put up central place , it needs more custom logic.
Here is what I have built before.

1 Like