[Vtigercrm-developers] Copy value from on ReferenceFieldValue (UI 10) to another (UI 10) via Jquery

Estefan Civera estefan.civera at gmail.com
Fri Mar 6 06:35:07 GMT 2015


Hi all,

when I change a value into the account_id field I need to set the same
value into the accountparent field

this is my js code, but when event fires this doesn't fill my second field

I've found function setReferenceFieldValue in Vtiger_Edit_Js class, is it
correnct?

can some one help me?

this is my code


// Event handler for account_id field
jQuery('input[name="account_id"]',
container).on(Vtiger_Edit_Js.referenceSelectionEvent, function(e, data){
            thisInstance.referenceSelectionEventHandler(data,
container);

            // I'm getting values of account_id field
            var params = {};
            params.name = data.selectedName;
            params.id = data.record;
            // Now I want pass them to my accountparent field. (seems that
the first parameter is wrong)

thisInstance.setReferenceFieldValue(jQuery('input[name="accountparent"]',
container), params);

...

thanks estefan civera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150306/5b00a29c/attachment.html>


More information about the vtigercrm-developers mailing list