Posts: 11
Threads: 3
Joined: Feb 2021
Reputation:
2
i have a webform that sends a new contact to corebos
inside the data of the contact i have put a variable that is the contact_no -> CONTACTO_XXX
from this fiel i wan to create a workflow that setup another field that is a contact related fiel that has
the first field contact_no
i had been trying without success a lot of time and i cant find the solution
this is the expression of the workflow that dont works now
cf_1236 -> is the related contact that i want to update
cf_1234 -> this is the CONTACT_XXX thas is allready filled
cf_1236 = $(cf_1234 : (Contacts) contact_no)
Posts: 11
Threads: 3
Joined: Feb 2021
Reputation:
2
02-16-2021, 10:22 AM
(This post was last modified: 02-16-2021, 10:27 AM by Victor Burgueño.)
thanks Joe, one of the options that i managed was to make a business map atached to a query that searches de contact id tor the incoming contatc_no and updates that field, but with that function you have implemented seems easyer
thanks, i am gonna try it :-D
ups... seems that that function its not availabele yet in the system
do i need to upgrade the full system or there its an option to only
upgrade workflows functions enhancements?
Posts: 11
Threads: 3
Joined: Feb 2021
Reputation:
2
02-16-2021, 04:55 PM
(This post was last modified: 02-16-2021, 05:04 PM by Victor Burgueño.)
i must to start working with the denormrelease but in this case
i had found a fast solution that is sending the id of the contact
directly form the form and now in the workflow it can attach
the relacted contact directly as I wanted
so for me to understand, from now on the released is denormalized as master?
if i want to upgrade i must denormalize the database first?
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
yes, correct, going forward the denormalization project is part of corebos
Joe
TSolucio
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
note that denormalizing is an optional choice
you can upgrade and not activate denormalization on any module, everything will keep working as before and the information will be saved in the same places
the idea is that you denormalize only those modules with a VERY large number of records and only if you need to
Joe
TSolucio
Posts: 11
Threads: 3
Joined: Feb 2021
Reputation:
2
Muchas gracias Joe por aclararme un poco mas el condepto
creo que va a ser muy util para proyectos con mucho crecimiento
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
First, why not just use coreBOS native workflow expressions? You should be able to do everything you need directly there. We haven't been doing custom functions for a long time and the ones we do are REALLY specific and complex things or situations where we want to optimize speed. The workflow language should be powerful enough to do the calculations you need.
I'd say the function is incorrect because you have two different offsets including files:
include '../config.inc.php';
require_once 'include/database/PearDatabase.php';
one of those has to be wrong, because either you are in a subdirectory and can "go up one" to get config.inc in which case the include PearDatabase is going to fail, or you are at the top directory where the code will find Peardatabase but not config.inc
A few notes:
- load vtlib/Vtiger/Module.php, which will load everything you need
- save your logs in the logs directory: it is a security issue to leave them lying around anywhere that they can get downloaded from the internet, the logs director is protected (if you have your apache correctly configured)
Joe
TSolucio