@api recordId - yields a property of the type ID

I want that to be turned into a string (ie. strId) before the next lines run, in order to use it to build an endpoint URL for an http call (ie. GetJson)

endpointURL = 'https://blahblah?AccountId=' + this.strId;
@wire(GetJson, {strEndPointURL:'$endpointURL'})
    retval ({error,data}){
        if (data) {
            this.resultjson = data.SiteDataAccount;
            console.log('GetJson endpointURL ==> : ', this.endpointURL); 
            console.log('GetJson strId ==> : ', this.strId) ; 
@api recordId

This is string in javascript. Javascript is loosely typed language and so you need not worry about it.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.