Hi all,
I’m trying to customize Cases->editview form in Suitecrm Version 7.8.11.
The scenario is that a new case requires the identifier of a customer asset (eg. ,a piece of machinery). I’ve created a custom field for the asset identifier and it is displayed as a dropdown on the Edit form. Now I need to be able to grab the ‘Account ID’ associated with the Account Name text field and feed it to a JQuery function to dynamically load the Asset dropdown through a web services call to another application’s API.
Loading the asset dropdown via web service works if the Case is being created from the Accounts->Case sub-panel where account_id is passed in the $POST/$GET arrays.
I’ve tried to detect various events (change, click, focusin) on the account_name selector to get the value of hidden field ‘account_id’ without complete success. The selected account’s identifier isn’t always detectable. I’m not sure how/when the search and popup logic that populates the ‘account_name’ text field changes the value of the hidden account_id field.
I’m open to any suggestions even if it doesn’t involve the use of JQuery.
Any ideas will be appreciated.