Redoo Module Documentation

WorkflowDesigner

Table of Contents

getFolderId()  : mixed
wf_get_entity()  : array<string|int, mixed>
Undocumented function
wf_get_user()  : void
Retrieve UserData of UserID
wf_recordlist()  : string
Get generated RecordList from "Generate Recordlist" Action
wf_json_encode()  : string
Simple JSON encoding a value
wf_create_password()  : string
Generate a random password
wf_getcampaignstatus()  : string
Return status of related campaign of Leads/Contacts/Accounts
wf_fieldvalue()  : string
Return value of a single field for a given crmid
wf_date()  : string
Format and modify a given date
wf_converttointernaldate()  : string
Convert a given date and source format to system format
wf_salutation()  : string
Translate the salutation field into your language
wf_log()  : void
Log a string to the statistic log to view later
wf_getenv()  : string
Get a value of current context environment field
wf_setenv()  : void
Set a value into current context environment field ($env)
wf_var_dump()  : void
Function to debug something. Simple make var_dump possible to use whtin expressions
wf_setfield()  : void
Set a value in the current record
wf_save_record()  : void
After you modify a record with wf_setfield, you need to save the record manually
wf_recordurl()  : void
return the URL to a record in your CRM system
wf_recordlink()  : string
Generate a html link tag to given recordid
wf_dbquery()  : array<string|int, mixed>
Execute a MySQL Query and return the result of the query
wf_dbSelectAll()  : array<string|int, mixed>
Execute a MySQL Query and return all result rows of the query
wf_formatcurrency()  : void
format a given value as currency for the current user
wf_cleancurrency()  : float
clear all user specific formatting from a value.
wf_oldvalue()  : mixed
wf_haschanged()  : mixed
wf_changedfields()  : mixed
wf_recordlabel()  : string
Get recordlabel of a given crmid
wf_fieldlabel()  : mixed
wf_getproducts()  : mixed
wf_requestvalues()  : mixed
wf_combine_comments()  : void
Combine comments of a record and return html of comments
wf_converttimezone()  : mixed
wf_pricelist_price()  : mixed
wf_getproductimage()  : mixed
Return product image details
wf_days_between()  : int
Calculate amount of days between two dates
wf_datetime_between()  : mixed
wf_multipicklist_add()  : void
Add a given value to a multipicklist value
wf_multipicklist_remove()  : void
Remove a given value from multipicklist value

Functions

getFolderId()

getFolderId(mixed $folder, mixed $connectionID) : mixed
Parameters
$folder : mixed
$connectionID : mixed
Return values
mixed

wf_get_entity()

Undocumented function

wf_get_entity(int $entity_id[, string $module_name = false ]) : array<string|int, mixed>
Parameters
$entity_id : int

CRMID of the Record you want to load

$module_name : string = false

If you know, the module name (default = Will be loaded from database)

Tags
example

$recordData = wf_get_entity($crmid); $recordData = wf_get_entity($account_id->Accounts->id);

Return values
array<string|int, mixed>

wf_get_user()

Retrieve UserData of UserID

wf_get_user(int $userid) : void
Parameters
$userid : int
Return values
void

wf_recordlist()

Get generated RecordList from "Generate Recordlist" Action

wf_recordlist(string $listId) : string
Parameters
$listId : string

ID of list, you set within Action

Return values
string

wf_json_encode()

Simple JSON encoding a value

wf_json_encode(mixed $value) : string
Parameters
$value : mixed
Return values
string

wf_create_password()

Generate a random password

wf_create_password([int $length = 8 ]) : string
Parameters
$length : int = 8
Return values
string

wf_getcampaignstatus()

Return status of related campaign of Leads/Contacts/Accounts

wf_getcampaignstatus(int $campaignId, string $recordModule, int $recordId) : string
Parameters
$campaignId : int

Which campaign should be checked

$recordModule : string

Related module you want to check

$recordId : int

crmid of record you want to check

Return values
string

wf_fieldvalue()

Return value of a single field for a given crmid

wf_fieldvalue(int $crmid, string $moduleName, string $field) : string
Parameters
$crmid : int

crmid, where the value should be loaded from

$moduleName : string

ModuleName of crmid

$field : string

which field do you want to get

Return values
string

wf_date()

Format and modify a given date

wf_date(string $value, string $interval[, string $format = "Y-m-d" ]) : string
Parameters
$value : string

The date you want to modify (YYYY-MM-DD [HH:II:SS]) Time is optional

$interval : string

Empty or every Date/Time Interval. Syntax see here: http://php.net/manual/en/datetime.formats.relative.php

$format : string = "Y-m-d"

Format you want to return (Placehlder: https://www.php.net/manual/en/function.date.php)

Tags
example

$germanDateNextDay = wf_date($dateField, '+1 day', 'd.m.Y')

Return values
string

wf_converttointernaldate()

Convert a given date and source format to system format

wf_converttointernaldate(string $value, string $srcFormat) : string
Parameters
$value : string

The string of DateTime you want to convert

$srcFormat : string

Set the format of $value

Return values
string

wf_salutation()

Translate the salutation field into your language

wf_salutation(string $value[, string $language = false ]) : string
Parameters
$value : string

The selected value in the Record

$language : string = false

The language you want to translate to

Return values
string

wf_log()

Log a string to the statistic log to view later

wf_log(string $value) : void
Parameters
$value : string

The string you want to log

Return values
void

wf_getenv()

Get a value of current context environment field

wf_getenv(string $key) : string
Parameters
$key : string

Which Environmental field should be loaded ($env)

Return values
string

wf_setenv()

Set a value into current context environment field ($env)

wf_setenv(string $key, mixed $value) : void
Parameters
$key : string

The key you want to set

$value : mixed

The value you want to set

Return values
void

wf_var_dump()

Function to debug something. Simple make var_dump possible to use whtin expressions

wf_var_dump(mixed $value) : void
Parameters
$value : mixed

The data you want to dump

Return values
void

wf_setfield()

Set a value in the current record

wf_setfield(string $field, mixed $value) : void
Parameters
$field : string

The field you want to set

$value : mixed

The value you want to set

Return values
void

wf_save_record()

After you modify a record with wf_setfield, you need to save the record manually

wf_save_record() : void
Return values
void

wf_recordurl()

return the URL to a record in your CRM system

wf_recordurl(int $crmid) : void
Parameters
$crmid : int

The CRMID of the record

Return values
void

Generate a html link tag to given recordid

wf_recordlink(int $crmid[, string $text = '' ]) : string
Parameters
$crmid : int

the crmid you want to link to

$text : string = ''

The linktext

Tags
uses
wf_recordurl
Return values
string

wf_dbquery()

Execute a MySQL Query and return the result of the query

wf_dbquery(string $query) : array<string|int, mixed>
Parameters
$query : string

The MySQL you want to execute

Tags
example

$queryData = wf_dbquery("SELECT * FROM vtiger_crmentity LIMIT 1");

Return values
array<string|int, mixed>

wf_dbSelectAll()

Execute a MySQL Query and return all result rows of the query

wf_dbSelectAll(string $query) : array<string|int, mixed>
Parameters
$query : string

The MySQL you want to execute

Tags
example

$queryData = wf_dbSelectAll("SELECT * FROM vtiger_crmentity LIMIT 10");

Return values
array<string|int, mixed>

wf_formatcurrency()

format a given value as currency for the current user

wf_formatcurrency(float|int $value) : void
Parameters
$value : float|int

The number you want to format

Tags
example

return wf_formatcurrency(12000.5); // returns related to the User Settings "12.000,50", '12000.50'

Return values
void

wf_cleancurrency()

clear all user specific formatting from a value.

wf_cleancurrency(string $value) : float

It use vtiger internal functions to clear formatting. So current User settings are used to clear.

Parameters
$value : string

The formatted number you want to clear

Tags
example
return wf_cleancurrency("1.200,55");
// returns related to the User Settings "1200.55"
Return values
float

wf_oldvalue()

wf_oldvalue(mixed $field, mixed $crmid) : mixed
Parameters
$field : mixed
$crmid : mixed
Return values
mixed

wf_haschanged()

wf_haschanged(mixed $field, mixed $crmid) : mixed
Parameters
$field : mixed
$crmid : mixed
Return values
mixed

wf_changedfields()

wf_changedfields(mixed $crmid[, mixed $internalFields = false ]) : mixed
Parameters
$crmid : mixed
$internalFields : mixed = false
Return values
mixed

wf_recordlabel()

Get recordlabel of a given crmid

wf_recordlabel(int $crmid) : string
Parameters
$crmid : int

crmid of record, you request label

Return values
string

wf_fieldlabel()

wf_fieldlabel(mixed $module, mixed $fieldName) : mixed
Parameters
$module : mixed
$fieldName : mixed
Return values
mixed

wf_getproducts()

wf_getproducts(mixed $crmid) : mixed
Parameters
$crmid : mixed
Return values
mixed

wf_requestvalues()

wf_requestvalues(mixed $fields, mixed $label[, mixed $pausable = false ][, mixed $stoppable = false ]) : mixed
Parameters
$fields : mixed
$label : mixed
$pausable : mixed = false
$stoppable : mixed = false
Return values
mixed

wf_combine_comments()

Combine comments of a record and return html of comments

wf_combine_comments(int $crmid[, int $limit = null ]) : void
Parameters
$crmid : int

crmid, where you want to get comments from

$limit : int = null

[optional] how much comments you want to have. By default unlimited

Return values
void

wf_converttimezone()

wf_converttimezone(mixed $time, mixed $currentTimezone, mixed $timezoneRequired) : mixed
Parameters
$time : mixed
$currentTimezone : mixed
$timezoneRequired : mixed
Return values
mixed

wf_pricelist_price()

wf_pricelist_price(mixed $productid, mixed $pricelistid) : mixed
Parameters
$productid : mixed
$pricelistid : mixed
Return values
mixed

wf_getproductimage()

Return product image details

wf_getproductimage(int $crmid) : mixed
Parameters
$crmid : int

crmid of product you want to get image for

Return values
mixed

wf_days_between()

Calculate amount of days between two dates

wf_days_between(string $date1, string $date2) : int
Parameters
$date1 : string

Date 1 in format YYYY-MM-DD

$date2 : string

Date 2 in format YYYY-MM-DD

Return values
int

wf_datetime_between()

wf_datetime_between(mixed $date1, mixed $date2[, mixed $unit = 'day' ][, mixed $roundUp = false ]) : mixed
Parameters
$date1 : mixed
$date2 : mixed
$unit : mixed = 'day'
$roundUp : mixed = false
Return values
mixed

wf_multipicklist_add()

Add a given value to a multipicklist value

wf_multipicklist_add(string $currentValue, string $addedValue) : void
Parameters
$currentValue : string

The current value of field

$addedValue : string

The option you want to add

Tags
example

wf_multipicklist_add($multipicklistfield, "NewOption")

Return values
void

wf_multipicklist_remove()

Remove a given value from multipicklist value

wf_multipicklist_remove(string $currentValue, string $removedValue) : void
Parameters
$currentValue : string

The current value of field

$removedValue : string

The option you want to remove

Tags
example

wf_multipicklist_remove($multipicklistfield, "RemoveOption")

Return values
void

Search results