Client Script - mapping data from different module

Client Script - mapping data from different module

Dear ZOHO Team

Firstly I need to describe the need - I need to have data from Contacts module based on lookup field - the 5 map limit is not enough for me because I have almost 20 fields to copy

So I have decided to make a Customer Script - and from unknown reasons it does not want to work at all - even simple detvalue doesn't make afield to field by Hard data within the srcipt.

PLease have a look at mu script (where I can check the logs) - messages does not appear only confirm that action of field change is recognized and nothing more happens.:
function onChange(field_name) {
    // ID from lookup field contact
    const ContactId = ZOHO.CRM.API.getFieldValue("Kontakt_w_bazie");

    if (!ContactId) return;

    // Data from Contacts module by ID of record
    ZOHO.CRM.API.getRecord({
        Entity: "Contacts",
        RecordID: ContactId
    })
    .then(function(response) {
        if (response && response.data && response.data[0]) {
            const ContactRecord = response.data[0];

            // references in Leads
            const StanowiskoField = ZDK.Page.getField("Baza_stanowisko_kontaktu");
            const Email1Field = ZDK.Page.getField("Baza_Odmowa_RODO_Email_1");
            const Email2Field = ZDK.Page.getField("Baza_Odmowa_RODO_Email_2");
            const Email3Field = ZDK.Page.getField("Baza_Odmowa_RODO_Email_3");
            const Tel1Field = ZDK.Page.getField("Baza_telefon_komorkowy_1");
            const Tel2Field = ZDK.Page.getField("Baza_telefon_komorkowy_2");
            const Tel3Field = ZDK.Page.getField("Baza_telefon_komorkowy_3");
            const TelStac1Field = ZDK.Page.getField("Baza_telefon_stacjonarny_1");
            const TelStac2Field = ZDK.Page.getField("Baza_telefon_stacjonarny_2");
            const BEmail1Field = ZDK.Page.getField("Baza_Email_1");
            const BEmail2Field = ZDK.Page.getField("Baza_Email_2");
            const BEmail3Field = ZDK.Page.getField("Baza_Email_3");

            // set up data in Leads
            StanowiskoField.setValue(ContactRecord.Stanowisko);
            Email1Field.setValue(ContactRecord.Email_Opt_Out);
            Email2Field.setValue(ContactRecord.EMail2_RODO_wyrazona_niezgoda);
            Email3Field.setValue(ContactRecord.EMail3_RODO_wyrazona_niezgoda);
            Tel1Field.setValue(ContactRecord.Home_Phone);
            Tel2Field.setValue(ContactRecord.Mobile);
            Tel3Field.setValue(ContactRecord.Telefon_komorkowy_3);
            TelStac1Field.setValue(ContactRecord.Other_Phone);
            TelStac2Field.setValue(ContactRecord.Telefon_stacjonarny_2);
            BEmail1Field.setValue(ContactRecord.Email);
            BEmail2Field.setValue(ContactRecord.Secondary_Email);
            BEmail3Field.setValue(ContactRecord.Email_3);
        }
    })
    .catch(function(error) {
        console.error("Błąd podczas pobierania kontaktu:", error);
    });
}

At the end I am thinking if the could be a reason that in some moment of time in translation the module Leads we called PreLeadds and now it is Leads again - I have checked the whole file of translation to polish and no old value of this PreLeads appears.

But maybe somewhere where I do not see?

Please help - Thank you warmly in advace
kochnik