I am having one scenario where i need to pass record id from LWC to Omniscript. I got the record Id in the track variable, but i am strugling to assign as the below at the place of abc.
<c-test-for-jate prefill='\{"ContextId":"abc","otherParam":"test"}' layout="lightning"></c-test-for-jate>
JS
@track rIdFromAccount;
@api set recordId(value) {
this._recordId = value;
this.rIdFromAccount = value;
}
get recordId() {
return this._recordId;
}
Trying below to set the recordId dynamically.
<c-test-for-jate prefill='\{"ContextId":"{rIdFromAccount}","otherParam":"test"}' layout="lightning"></c-test-for-jate>
Throwing the below error :Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'error')
When i am hardcoding the id salesforce is working as expected.