• Caleb Kuester 44
  • NEWBIE
  • 20 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

Greetings!

I have a question centering specifically on the sfdx force:source:deploy command.

As it stands, you can add a predestructivechanges flag to it, which allows you to add an XML file with a list of components that you're wanting to delete in whichever environment. This has been a fantastic change, but there's a significant problem with it.

If you set it and you have an XML file and it fails deployment from your branch, the next attempt is guaranteed to fail unless you remove your pre-destructive changes XML file from the branch first because the pre-destructive changes already happened prior to the primary deployment.

The only graceful solutions I can think of is if Salesforce either allows you to continue deployment of destructive changes even if they don't exist, or Salesforce rolls back the deletion on a failed deployment. The alternative is to run pre-destructive changes at the beginning, which potentially incurs the wrath of the test class runs, which doubles the time required to run deployments.

Anybody have thoughts?

Greetings!

I'm able to authenticate with code that goes something like this:

request.request("POST", "/services/oauth2/token", urllib.parse.urlencode(body), headers)
response = request.getresponse()
print("status and reason: ", response.status, response.reason)
if(response.status == 200):
    response_string = str(response.read())
    formatted_for_json_string = response_string[-(len(response_string)-2):-1]
    json_response = json.loads(formatted_for_json_string)
    for value in json_response:
        if(value == "access_token"):
            access_token = json_response[value]
        if(value == "instance_url"):
            _endpoint = json_response[value]
        if(value == "token_type"):
            token_type = json_response[value]


That part works and sets up some of the required data for the Bulk Load Job creation.
 

headers = {
    "Authorization" : token_type + " " + access_token,
    "Content-Type": "application/json",
    "Accept": "*/*",
    "Cache-Control": "no-cache",
    "Host": host,
    "Accept-Encoding": "gzip, deflate, br",
    "Connection": "keep-alive"
}

body = {
    "object":"Account",
    "contentType":"CSV",
    "operation":"update"
}

request = client.HTTPSConnection(host, timeout=10)
request.request("POST", "/", urllib.parse.urlencode(body), headers)
response = request.getresponse()
 

The reponse is 200, but the gzip decompression of the response is:
b''

This is an indication that the response was empty. This makes sense considering a Bulk Data Load job was not created as a result of the transaction.

This all works in Postman and I've been attempting to mirror as much of the Postman behavior as possible except for adding the Postman-specific header bits and cookie info. The Authorization part has "Bearer key" in it, though the behavior is no different if I don't have a key.

If I use the key obtained in Postman, that also doesn't change the behavior.

Curious what I'm missing.

It seems that this is not possible, or not supported. Basically, the idea is that I would like to make something like a spinner in an extensible component and then allow other components to gain access to that spinner by inheritance.

I'm able to inherit JS functions just fine, but I'm not seeing a page that's able to succinctly show markup being transferrable by inheritance as an option. A couple even outright say it won't work.

Curious on what the final verdict is.

Greetings!

I'm able to authenticate with code that goes something like this:

request.request("POST", "/services/oauth2/token", urllib.parse.urlencode(body), headers)
response = request.getresponse()
print("status and reason: ", response.status, response.reason)
if(response.status == 200):
    response_string = str(response.read())
    formatted_for_json_string = response_string[-(len(response_string)-2):-1]
    json_response = json.loads(formatted_for_json_string)
    for value in json_response:
        if(value == "access_token"):
            access_token = json_response[value]
        if(value == "instance_url"):
            _endpoint = json_response[value]
        if(value == "token_type"):
            token_type = json_response[value]


That part works and sets up some of the required data for the Bulk Load Job creation.
 

headers = {
    "Authorization" : token_type + " " + access_token,
    "Content-Type": "application/json",
    "Accept": "*/*",
    "Cache-Control": "no-cache",
    "Host": host,
    "Accept-Encoding": "gzip, deflate, br",
    "Connection": "keep-alive"
}

body = {
    "object":"Account",
    "contentType":"CSV",
    "operation":"update"
}

request = client.HTTPSConnection(host, timeout=10)
request.request("POST", "/", urllib.parse.urlencode(body), headers)
response = request.getresponse()
 

The reponse is 200, but the gzip decompression of the response is:
b''

This is an indication that the response was empty. This makes sense considering a Bulk Data Load job was not created as a result of the transaction.

This all works in Postman and I've been attempting to mirror as much of the Postman behavior as possible except for adding the Postman-specific header bits and cookie info. The Authorization part has "Bearer key" in it, though the behavior is no different if I don't have a key.

If I use the key obtained in Postman, that also doesn't change the behavior.

Curious what I'm missing.

Greetings colleagues!
I am having trouble running a command line query using curl as described in the "Apex Web Services" trailhead module.
My query is:
curl -v https://login.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=3MVG9SOw8KERNN09ehk9tCIoYp.aYCp_xA94091vWwHwZAD7lHVP6MqAVGbtQbrlKeq2Rp1fyT6x1uw33vjGy" -d "client_secret=6E0E87676A134C0CB0DA749BABB418C83DC85D11D0C9CD5B9DFE7ABFE4758D55" -d "username=a.igoshin@playful-otter-w2zsim.com" -d "password=alex12345678cFTM2sASCDbggLg4iIc88nO" -H 'X-PrettyPrint:1'
The answer is
User-added imageAny ideas?
 
Hello!
I created a new project with manifest in VS Code, but I am not able to authorize an Org(sandbox) to it. When I run:

sfdx force:auth:web:login --setalias <alias> --instanceurl <sanboxURL> --setdefaultusername

, it opens the authentication screen, then I insert login + password and it redirects me to localhost:1717 with the following error: 

Error authenticating with auth code due to: authentication failure
This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again.

,in vsc it shows me the following error:

ERROR running auth:web:login:  Invalid client credentials. Verify the OAuth client secret and ID. Error authenticating with auth code due to: authentication failure

VS Code Version: 1.56.2
SFDX CLI Version: sfdx-cli/7.102.0 win32-x64 node-v16.1.0
Salesforce Extension Pack: 51.14.0