Hello,
I’ll try to keep as clear and simple as I can…
I have 2 forms ‘Factures’ (invoices) and ‘Entreprises’ (clients), classic one Client to many Invoices.
– ‘Entreprises’ is linked to Factures with a one-to-many relation.
– Each one of the ‘Entreprises’ has a ‘Code’.
– In ‘Factures’ I want to concatenate “code_entreprise” with other fields from ‘Factures’.
I wrote a script which works except for one line where I’m trying to get the ‘Code’ value from ‘Entreprises’ with:
var code_entreprise = entreprises.getFieldValue(‘fld-e0835c6dcdd9468dbd5b4a65107b20d4’);
but get a ‘ReferenceError: Can’t find variable: entreprises, line:(null)’
See line 21 on the screenshot.
Any clue of what I’m doing wrong?
Gilles
Attachments:
You must be
logged in to view attached files.
entreprises
is not defined. First you have to fetch the content of the respective field in your current record.
var entreprises = record.getFieldValue('fld-xxx');
fld-xxx
is the value for the entreprises
field.