certinia / apex-mdapi

Apex Wrapper for the Salesforce Metadata API
BSD 3-Clause "New" or "Revised" License
689 stars 976 forks source link

System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element includeRecordsOwnedByAll #299

Open ssj3096 opened 11 months ago

ssj3096 commented 11 months ago

While fetching sharing criteria Rules I'm getting error System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element includeRecordsOwnedByAll

MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader = new MetadataService.SessionHeader_element(); service.SessionHeader.sessionId = UserInfo.getSessionId(); MetadataService.SharingCriteriaRule sh=(MetadataService.SharingCriteriaRule)service.readMetadata('SharingCriteriaRule', new String[]{'SharingRuleName'}).getRecords()[0];

lrock-eqt commented 3 months ago

I also faced this same exception. Looks like a new element was added to SharingCriteriaRule by Salesforce that hasn't been addressed in the SharingCriteriaRule subclass.