• Jon-Freed
  • NEWBIE
  • 0 Points
  • Member since 2018
  • Owner/Principal
  • Do SF with Jon @ Atadar Services


  • Chatter
    Feed
  • 0
    Best Answers
  • 6
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
Scenario:   Go to Setup, App Manager, click "New Lightning App", provide a name and other details, and then select which items (Navigation Items, Tabs) you want.  When you finish, you will have a new row in AppMenuItem, and it will have a StartUrl value that looks something like this:

https://<mydomain>.my.salesforce.com/home/home.jsp?tsid=02uXXXXXXXXXXX

However, if my user is in the Lightning Experience and I go to that URL, then that new app is not loaded.

Is there a different URL to use?

Cross-Reference:  Idea: "Allow the ability to change a users default app with permission sets" (https://success.salesforce.com/ideaView?id=08730000000Dig6AAC)
When trying to use sfdx to sync "CustomHelpMenuSection" data, I ran into an error "Cannot read property 'metadataName' of undefined".

The error has something to do with the relationship between the api version I was using with sfdx and the contents of the sfdx project ./org/<username>/metadataTypeInfos.json file.  I was able to determine this splitting a comprehensive package.xml file into type-by-type executions.  Painful.   Hopefully this knowledge can save somebody else the trouble.

Jon Freed

FYI:  Nested folders are currently causing problems.  Nested folders can exist, for example, in reports and dashboards.

During a source:retrieve operation, a nested folder can result in the error "EISDIR: illegal operation on a directory".

During a mdapi:convert operation, a nested folder can result in the error "expected metadata file at path".

The only way I was able to determine that these errors resulted from nested folders was to divide a comprehensive package.xml file into separate package.xml files for almost every single item.  Hopefully this post will save some of you that work.  :)

Jon Freed

Is anybody else experiencing differently formatted XML from the following two commands?
  • sfdx force:mdapi:retrieve
  • sfdx force:source:convert

Ideally, if do a (1) mdapi:retrieve, then a (2) mdapi:convert, and then a (3) source:convert, the outputs of the first and third commands should be exactly the same.  However, I am seeing that the XML file outputs are different.  Mdapi:retrieve outputs "&apos;", while source:convert outputs "&#39;".  Mdapi:retrieve sometimes outputs a extra newline at the end of a file that source:convert does not.  And they sometimes output XML nodes in a different order from each other.

I have resolved this problem through code.  I'm wondering if anybody else has experienced this difference and what you are doing about it.

I know there are many other ways to access Salesforce API endpoints than through the AJAX Toolkit Shell.  So, the following problem is not holding me up and shouldn't hold up anybody else.  That being said....

If you try to use the AJAX Toolkit Shell, do you also experience an infinite loop of prompts to login?

Use case:
  1. The help page at https://help.salesforce.com/articleView?id=loader_content.htm&type=5 says to use the AJAX Toolkit Shell.  (Yes, I know there are resources other than the AJAX Toolkit Shell that can be used to get the information that page is directing you to get.)
  2. When I go to the toolkit at https://[my-domain].my.salesforce.com/soap/ajax/45.0/debugshell.html, then Salesforce redirects me to the login page at https://[my-domain].my.salesforce.com/?startURL=/soap/ajax/45.0/debugshell.html. After I log in, Salesforce takes me back to the AJAX Toolkit Shell page, but that page redirects me again to the login page. This loop continues ad infinitum.
The cause for this loop appears to be that the "sid" cookie is inaccessible from Salesforce's Toolkit JavasSript because Salesforce elsewhere flagged the "sid" cookie as "HttpOnly".  (So, the cookie is passed during HTTP/S communication but isn't accessible to the JavaScript.)

Thoughts?  Confirmations?

(Again, I know there are lots of resources available other than the  AJAX Toolkit Shell that work.  This question is solely about whether anybody else is encountering this error with the Tookit itself.)
Scenario:   Go to Setup, App Manager, click "New Lightning App", provide a name and other details, and then select which items (Navigation Items, Tabs) you want.  When you finish, you will have a new row in AppMenuItem, and it will have a StartUrl value that looks something like this:

https://<mydomain>.my.salesforce.com/home/home.jsp?tsid=02uXXXXXXXXXXX

However, if my user is in the Lightning Experience and I go to that URL, then that new app is not loaded.

Is there a different URL to use?

Cross-Reference:  Idea: "Allow the ability to change a users default app with permission sets" (https://success.salesforce.com/ideaView?id=08730000000Dig6AAC)
When trying to use sfdx to sync "CustomHelpMenuSection" data, I ran into an error "Cannot read property 'metadataName' of undefined".

The error has something to do with the relationship between the api version I was using with sfdx and the contents of the sfdx project ./org/<username>/metadataTypeInfos.json file.  I was able to determine this splitting a comprehensive package.xml file into type-by-type executions.  Painful.   Hopefully this knowledge can save somebody else the trouble.

Jon Freed

FYI:  Nested folders are currently causing problems.  Nested folders can exist, for example, in reports and dashboards.

During a source:retrieve operation, a nested folder can result in the error "EISDIR: illegal operation on a directory".

During a mdapi:convert operation, a nested folder can result in the error "expected metadata file at path".

The only way I was able to determine that these errors resulted from nested folders was to divide a comprehensive package.xml file into separate package.xml files for almost every single item.  Hopefully this post will save some of you that work.  :)

Jon Freed

Is anybody else experiencing differently formatted XML from the following two commands?
  • sfdx force:mdapi:retrieve
  • sfdx force:source:convert

Ideally, if do a (1) mdapi:retrieve, then a (2) mdapi:convert, and then a (3) source:convert, the outputs of the first and third commands should be exactly the same.  However, I am seeing that the XML file outputs are different.  Mdapi:retrieve outputs "&apos;", while source:convert outputs "&#39;".  Mdapi:retrieve sometimes outputs a extra newline at the end of a file that source:convert does not.  And they sometimes output XML nodes in a different order from each other.

I have resolved this problem through code.  I'm wondering if anybody else has experienced this difference and what you are doing about it.

I know there are many other ways to access Salesforce API endpoints than through the AJAX Toolkit Shell.  So, the following problem is not holding me up and shouldn't hold up anybody else.  That being said....

If you try to use the AJAX Toolkit Shell, do you also experience an infinite loop of prompts to login?

Use case:
  1. The help page at https://help.salesforce.com/articleView?id=loader_content.htm&type=5 says to use the AJAX Toolkit Shell.  (Yes, I know there are resources other than the AJAX Toolkit Shell that can be used to get the information that page is directing you to get.)
  2. When I go to the toolkit at https://[my-domain].my.salesforce.com/soap/ajax/45.0/debugshell.html, then Salesforce redirects me to the login page at https://[my-domain].my.salesforce.com/?startURL=/soap/ajax/45.0/debugshell.html. After I log in, Salesforce takes me back to the AJAX Toolkit Shell page, but that page redirects me again to the login page. This loop continues ad infinitum.
The cause for this loop appears to be that the "sid" cookie is inaccessible from Salesforce's Toolkit JavasSript because Salesforce elsewhere flagged the "sid" cookie as "HttpOnly".  (So, the cookie is passed during HTTP/S communication but isn't accessible to the JavaScript.)

Thoughts?  Confirmations?

(Again, I know there are lots of resources available other than the  AJAX Toolkit Shell that work.  This question is solely about whether anybody else is encountering this error with the Tookit itself.)
I've got a custom request object and I'd like to create an action button with LWC that prompts the user to add a note and a file then posts the note and file to the chatter feed and changes the status of the record. I do not want to use Aura if possible. I'm not sure how to open a modal from an action button (something like the below)
<lightning-button label="Submit" slot="actions" onclick={handleSubmitClick}></lightning-button>
I'm not sure how to add an entry to the feed. Is this even possible with LWC?

Lastly, I'm not sure how to modify the record without using the lightning-record-form. Is Apex method the only option?
 

FYI:  Nested folders are currently causing problems.  Nested folders can exist, for example, in reports and dashboards.

During a source:retrieve operation, a nested folder can result in the error "EISDIR: illegal operation on a directory".

During a mdapi:convert operation, a nested folder can result in the error "expected metadata file at path".

The only way I was able to determine that these errors resulted from nested folders was to divide a comprehensive package.xml file into separate package.xml files for almost every single item.  Hopefully this post will save some of you that work.  :)

Jon Freed

Is anybody else experiencing differently formatted XML from the following two commands?
  • sfdx force:mdapi:retrieve
  • sfdx force:source:convert

Ideally, if do a (1) mdapi:retrieve, then a (2) mdapi:convert, and then a (3) source:convert, the outputs of the first and third commands should be exactly the same.  However, I am seeing that the XML file outputs are different.  Mdapi:retrieve outputs "&apos;", while source:convert outputs "&#39;".  Mdapi:retrieve sometimes outputs a extra newline at the end of a file that source:convert does not.  And they sometimes output XML nodes in a different order from each other.

I have resolved this problem through code.  I'm wondering if anybody else has experienced this difference and what you are doing about it.

Hello folks, 

Today we were trying to work on a utility that will list out all references to a field. This is intented to help the business to analyze a field before they plan to update/delete it. 

What we are trying to achieve?
- Once the user selects an object and one of its fields, we want to list out all possible components where the selected field is referenced. 

What were we able to achieve, using what?
- We first tried the Standard SOQL approach and queried objects such as ApexClass, ApexComponent, ApexPage and ApexTrigger : this helped us to find out references of a field in the code by scanning their body/markup. 
- We then thought of utilizing the Tooling API that has a SOSL feature, using which we were able to retreive all the codes where the field was referenced. 
Code snippet:
/services/data/v34.0/tooling/search/?q=FIND{BillingCity}

This gives me a list of all code where there is "BillingCity" referred. 

However, none of the approaches has helped us to touch other components such as:
- formula field
- report filters
- workflow field updates

Wanted to understand how do we get around this?
I know this is possible using Tooling API but then if I end up making one http callout for each component then I am going to make a lot of callouts. 
Is there something I am missing here? 
Need some guidance around this. 

Many thanks in advance!
Hi- I would like to know if there is any ways to find the when the sandbox got refreshed from the Sandbox itself. I know we can see the history in Production. But we have developers working who don't have production access and want to know the date of the last refresh.

Any idea?

Thanks