You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed the AuraDefinitionBundle has some extra read methods, so attempted to duplicate them for LWCs too, but am still running into issues. Also added extends Metadata too.
Here is the output I have so far. It looks to be retrieving the top-level metadata without any issues (except the targets/targetConfigs).
masterLabel, isExposed, fullName, description and apiVersion are all populated as expected, but the lwcResources is empty. Which I'm expecting to have an array of the files that make up the LWC (.js, .html and/or .css).
// anon apex code to test the methodMetadataService.IReadResultreadNewLwcMagic() {
MetadataService.MetadataPortservice=createService();
returnservice.readMetadata('LightningComponentBundle', newString[]{'dynamicLwcTest'});
}
MetadataService.MetadataPortcreateService() {
MetadataService.MetadataPortservice=newMetadataService.MetadataPort();
service.SessionHeader=newMetadataService.SessionHeader_element();
service.SessionHeader.sessionId=UserInfo.getSessionId();
returnservice;
}
MetadataService.IReadResultresultRead=readNewLwcMagic();
MetadataService.Metadata[] records=resultRead.getRecords();
for (MetadataService.MetadatarecordResult:records) {
System.debug('recordResult:');
System.debug(JSON.serialize(recordResult));
}
Struggling to get LWC reading/creating/updating working properly.
Current WSDL Generated Apex
Auto generated from the Metadata WSDL export, and then the Generate Apex from WSLD.
Noticed the
AuraDefinitionBundle
has some extra read methods, so attempted to duplicate them for LWCs too, but am still running into issues. Also addedextends Metadata
too.Current Output
Here is the output I have so far. It looks to be retrieving the top-level metadata without any issues (except the
targets
/targetConfig
s).masterLabel
,isExposed
,fullName
,description
andapiVersion
are all populated as expected, but thelwcResources
is empty. Which I'm expecting to have an array of the files that make up the LWC (.js
,.html
and/or.css
).LightningComponentBundle
does look to be supported by the SOAP APIThe text was updated successfully, but these errors were encountered: