Jump to content

JS getting last not current value from cascading dropdown virtual field


Recommended Posts

Hello,

I have some code running in the footer of an Update datapage that on change of one virtual field (Virtual 4: drop down) gets the value of another virtual field (Virtual 7: cascading text, with Virtual 4 as the ParentID) and copies that value of Virtual 7 into a text64000 field.  The problem is it keeps getting the 'previous' value of Virtual 7 and not the current one, when Virtual 4 is updated.  Meaning the code runs the 'copy' function BEFORE Virtual 7 is updated. I need to get the 'updated' data from Virtual 7 and copy that into the text64000 field. 

The code I'm using is: 

$("[name='cbParamVirtual4']").change(function(){
  
  f_copy_print_address('cbParamVirtual7', 'cke_EditRecordShipToAddress');
   
});
 

So if there's some way to 'refresh' or 'update' Virtual 7 before the f_copy_print_address code runs that'd be great. Many thanks!

Link to post
Share on other sites
  • 4 weeks later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...