Announcement

Collapse
No announcement yet.

How to add custom Javascript functionality to field of a Lead?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add custom Javascript functionality to field of a Lead?

    Hi,

    I've created two Fields in the Entity Manager for the Lead:

    - interaction_type (Enum)
    - internal_reference (Int)

    The field "internal_reference" will be required IF the "interaction_type" have the option 2 selected.

    I think to achieve this I must to add some custom Javascript/Jquery. If this assumption is correct, how can I add a Javascript file to the Lead "Detail" and "Detail (Small)" panels?

    Best Regards,
    André Lopes.

  • #2
    Hi
    If you use version 4.3+, you can set it without development.
    For this go to Entity Manager, choose the field and set this rule in Dynamic Logic panel
    https://youtu.be/WDSTMNFZPLE?t=5m32s - here you can see an example
    Last edited by tanya; 04-26-2017, 03:47 PM.

    Comment


    • #3
      Originally posted by tanya View Post
      Hi
      If you use version 4.3+, you can set it without development.
      For this go to Entity Manager, choose the field and set this rule in Dynamic Logic panel
      https://youtu.be/WDSTMNFZPLE?t=5m32s - here you can see an example
      Hi tanya,

      I'm using 4.2.7.

      It is safe to use the 4.3? I cannot see that version in the espocrm.com Download Area. It is possible to Upgrade from 4.2.7 to 4.3? If yes, how to and where are the files?

      Best Regards,
      André Lopes.
      Last edited by tanya; 04-26-2017, 03:47 PM.

      Comment


      • #4
        http://forum.espocrm.com/forum/annou...crm-4-3-0-beta

        Comment


        • #5
          It is safe to use?

          Thanks

          Comment


          • #6
            As I know - yes. But you can wait for a stable version. Maybe it will be released next week. But even the stable version doesn't give you the guarantee lack of bugs.
            Create a backup (files and db) and try it

            Comment


            • #7
              I will give it a try. It is a best option than hacking some custom JavaScript.

              My server have a PHP 5.4.16, it will work or I must have to upgrade to PHP 5.5+ to run the 4.3?

              Best Regards,
              André Lopes.

              Comment


              • #8
                Even now is better to use PHP 5.5+. If you need only Dynamic logic and don't want to upgrade EspoCRM, you can set the rules in clientDefs formDependency section
                example in application/Espo/Modules/Crm/Resources/metadata/clientDefs/MassEmail.json

                create a file custom/Espo/Custom/Resources/metadata/clientDefs/{YourEntityName}.json and set you rules (in your case - "action": "setRequired")
                (client/src/views/record/base.js _doDependencyAction func for seeing all available actions)

                Comment

                Working...
                X