• 1-3 of 3
  • Andre Kampmann

    I solved it with a hook, as Luuk said. 

    I tried it many times with "post_contact_create" and update but nothing worked.

    My problem was to find the hierarchy of the object and its names. This is my hooks_model.php

    namespace Custom\Models;
    class Hooks_model {
    function copyCPFToLogin(&$hookData)
    ['data']->Login = $hookData['data']->CustomFields->c->cpf ;


    In hooks.php when i tried PRE, pre_contact_create and update, it worked.

    Thanks for the help everyone.

  • Andre Kampmann

    Sorry for those that don't understand but this screenshot is the working Business Rule for Organization, If match Then it sets the field Invalid Name to "No" and Else to "Yes". 

  • Andre Kampmann

    MB, tried it and nothing. 

    But solved it using POSIX and found out that the problem was the Space and Punctuation in the end of my old regex [0-9a-zA-Z ].

    I worked it out with a tutorial i found on this website. This regex works with space, numbers, letters, punctuation: ([[:alnum:][:space:][:punct:]]){5,255}

    And to help you here are the character classes that worked with me:

    POSIX Description ASCII
    [:alnum:] Alphanumeric characters [a-zA-Z0-9]
    [:alpha:] Alphabetic characters [a-zA-Z]
    [:ascii:] ASCII characters [\x00-\x7F]
    [:blank:] Space and tab [ \t]
    [:cntrl:] Control characters [\x00-\x1F\x7F]
    [:digit:] Digits [0-9]
    [:graph:] Visible characters (i.e. anything except spaces, control characters, etc.) [\x21-\x7E]
    [:lower:] Lowercase letters [a-z]
    [:print:] Visible characters and spaces (i.e. anything except control characters, etc.) [\x20-\x7E]
    [:punct:] Punctuation and symbols. [!"#$%&'()*+,
    [:space:] All whitespace characters, including line breaks [ \t\r\n\v\f]
    [:upper:] Uppercase letters [A-Z]
    [:word:] Word characters (letters, numbers and underscores) [A-Za-z0-9_]
    [:xdigit:] Hexadecimal digits [A-Fa-f0-9]


    Thanks for the help.