New answers tagged

1

From the docs: Choosing a WSDL There are two Lightning Platform Web services for which you can obtain WSDL files for API access: Lightning Platform Enterprise WSDL—This API is for most enterprise users who are developing client applications for their organization. Lightning Platform Partner WSDL—This API is for Salesforce partners who are ...


0

I don't have an org at hand to test with an Apex webservice class, but I think this pattern will avail you. What I typically do is use a session cookie store and start with a request to https://myinstance.salesforce.com/secur/frontdoor.jsp?sid=<my access token> Salesforce then creates all the cookies that are required for further HTTP requests to ...


1

Thanks Nick Cook and David Cheng, both of your answers helped! The solution was that I needed to create a Contact object as well and also grab the right profile to be associated with it. The solutions looks something like: Profile admin = [ SELECT Id FROM Profile WHERE Name='System Administrator' ]; Profile regular = [ SELECT Id FROM ...


0

EDIT I believe the major issue asside from RetrieveRequestMsg is that you are using soapenv: for envelope, but showing s: on your body nodes. e.g. <s:Body> should be <soapenv:Body> and same with the closing tag. I am not sure why you are getting an HTML response. I would verify your URL - as the response to the Service.asmx should return XML. ...


1

Here's an example SOAP envelope header with fueloauth: <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <fueloauth xmlns="http://exacttarget.com">ACCESS ...


1

The UserType field is not a settable field. It will be derived from the license applied to the user when setting the profile. Given you're setting the profile to be the system administrator profile, if you query for the usertype, you should find it to be a 'Standard' user type. If you want a different user type, you'll need to apply a different profile. ...


1

It looks like you're trying to create some kind of community user like a Customer Community users. Community users require an existing Contact and Account record, and the user record has to be linked to the contact record. You can use Site.createExternalUser() to create a community user - this will automatically create the contact record. See ...


0

Find below code and note points: Count of docs against each case - eachCaseDocsCount Count of all docs - totalDocs Count of all docs for caseList - casesDocsCount Below is the anonymous apex code to find: list<Case> caseList = [....]; Map<Id, Integer> eachCaseDocsCount = new Map<Id, Integer>(); for(Case cs : caseList){ ...


1

I suspect that your custom profile does not actually remove access to modify Apex code. If run against a Standard Platform User, this query returns the expected values (HasReadAccess true, HasEditAccess et al. false) in my org. Since authoring Apex isn't permissioned on a per-class basis, the permission fields on UserRecordAccess aren't meaningful for Apex ...


1

I believe 'OptOutList' SendDefinitionListType is for Publication Lists. Try the Type of 'ExclusionList' (src) As for DataSourceTypeID, it would depend on if its a real list or a DE as to what value you put in: (src) Here is a sample of an exclusion list I have successfully used in some of my calls: <SendDefinitionList> <...


Top 50 recent answers are included