certinia / apex-mdapi

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

Winter 19 URL.getOrgDomainUrl() instead of getSalesforceBaseUrl() eliminates need for RemoteSiteSetting!!!! #237

Open dseligson opened 5 years ago

dseligson commented 5 years ago

https://github.com/financialforcedev/apex-mdapi/blob/526f8811d6e5ad4a86582ffa1ddb68ca99d2deda/apex-mdapi/src/classes/MetadataService.cls#L13193

Verified today that using Apex with mdapi (not Lightning Javascript + Named Credential) can now successfully call the Salesforce Metadata WebService without needing an entry in Remote Site Settings. See the Winter '19 release notes: https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_apex_streamline_api_calls.htm

Yes, you read that right. We no longer need to hide javascript in a Visualforce page that manually sends Web Service messages to create the Remote Site Setting. Hallelujah! Somehow, I believe this was somehow an @afawcett effect, his orchestrations with Salesforce finally resulted in true progress, and probably an easier code review as well.

public String endpoint_x = URL.getOrgDomainUrl().toExternalForm() + '/services/Soap/m/42.0';

Hark the herald angel's sing, say goodbye to Remote Site Setting (okay, it doesn't quite work, but you know what i mean)

HappyFace

rsoesemann commented 5 years ago

I fixed this in this Pull Request #224 which is still not merged in. I fear since @afawcett left Financilforce nobody is taking care of this project anymore.

dseligson commented 5 years ago

Thanks for this message. I hadn't realized he left there. I did get one response from him about this on his blog, though, so he still occasionally looks at it. Maybe SFDC told him to stop supporting it as it competes with their own Metadata API.

On Tue, Jun 18, 2019 at 9:48 AM Robert Sösemann notifications@github.com wrote:

I fixed this in this Pull Request #224 https://github.com/financialforcedev/apex-mdapi/pull/224 which is still not merged in. I fear since @afawcett https://github.com/afawcett left Financilforce nobody is taking care of this project anymore.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/financialforcedev/apex-mdapi/issues/237?email_source=notifications&email_token=AAD632EXOYV3WXI7XMTFFQTP3EGXRA5CNFSM4HK2EVDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7IGCY#issuecomment-503218955, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD632ACE3X2HK63IDIKY2LP3EGXRANCNFSM4HK2EVDA .