How to use CPQJS framework to set the value of a commerce country and state field
I'm trying to implement the Google type-ahead address search logic within my JET commerce screen and I'm able to populate all address values except the country and state. I'm using the CPQ country and state components that ae configured globally for the site. I assume that this is why the CPQJS.setAttributeVal() function doesn't appear to work in this instance.
The google type-ahead address search sets an event listener on the address 1 field and when the user types in a partial address, it will pop up a list of suggestions to select from. All of this is currently working today, but the actual function to populate the country and state doesn't work when using the CPQJS.setAttributeVal logic for the country and state fields.