How to put a serial/pholio numer to the opportunities created?

Hello DevGods, my name is Angel and I´m new in Sugar. I was wondering if there is a way to get every Opportunity once saved to tag itself. 

Example: I make my first opportunity and I want to "tag" that Opportunity with the first letter of the Business Center, the year when it was made, the first letter of first and last name, plus the numer of the Opportunity. It would look something like: M20AR0001, where the "M" stands for Mexico, the "20" for the year created, "A" for Angel (first name) "R" for Ruiz (last name) and the "0001" for the number of the Opportunity, once saved that numer will identify my Opportunity to make it searchable easier. The next Opportunity created when saved should be tagged as M20AR0002, and so on. 

Please if anyone could help me I will be absolutely grateful and in debt.

Thanks in advance.

Parents
  • Hello 

    Welcome to the Sugar community club!

    In many cases, there is no need to be a developer to perform Sugar configuring.
    If you are a Sugar admin or Sugar Partner consultant, you can use Logic Builder for Sugar to draw logic hook and get ready-to-use extension in a click

    Here is how your task implementation may look like (to read follow the white line):


    As you can read from Logic, it works whenever new Opp is saved
    Createuser Firstname, createuser Lastname , createuser Business Center and year of the current date of opp created are used to concat new Tag name for the newly created opp.

    The autoincrement field that would fit generate Opp number demand is not avaliable right now - it is announced in Q4 2020 Sugar release  (you may read about it here https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/nearly-everything-you-need-to-know-about-the-q4-2020-release)
    So far, for example, the Opp.Description may contain the Opp number added by user manually. 

    Anyway, the Tag will be always unique for each Opp, therefore it should be created prior assigning to the Opp then linked to Opp -you may see it in the flowchart

    Here is zip extension generated by Logic Builder for this flowchart
    You may install via Admin -> Module Loader:

    z20200923_flowchart_lb5f6b136e527e68_11358065.zip

    Please let me know if any questions

    And one more thing
    As a Sugar Consultant I have doubts if setting unique Tag is a solution - Tags are used for referencing records of different modules  to some commonality, which is expressed in the Tag name.

    Therefore creating unique tags one per Opp record does not correspond to the idea of the Tag

    Consider adding a custom "Opportunity Code" field for the Opportunity for search purpoces and filling out it with the value according to the logic  you requested avoiding Tags usage

    If you have questions , feel free to write to dch@integroscrm.com


    All the Best, 
    Dmytro

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • Thanks a lot! That will do it! Also I will take in consideration your suggestion because that makes a lot of sense to me! Appreciate the support!

Reply Children
No Data