When is the AccountId field not available as a merge field for JS buttons
May be a basic question but I could not find specific documentation and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript button.
In these cases one would have to use {!Account.Id}
.
The two that I know of so far where it is NOT allowed are (although it is available via SOQL and describe):
- Contact
- Order
It IS allowed on the opportunity though.
Bonus Is there a way to programatically tell in the describe information if the field is not available for a JS merge field and needs to be transformed to Account.Id
Also any links to documentation would be helpful.
custom-button describefieldresult
add a comment |
May be a basic question but I could not find specific documentation and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript button.
In these cases one would have to use {!Account.Id}
.
The two that I know of so far where it is NOT allowed are (although it is available via SOQL and describe):
- Contact
- Order
It IS allowed on the opportunity though.
Bonus Is there a way to programatically tell in the describe information if the field is not available for a JS merge field and needs to be transformed to Account.Id
Also any links to documentation would be helpful.
custom-button describefieldresult
add a comment |
May be a basic question but I could not find specific documentation and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript button.
In these cases one would have to use {!Account.Id}
.
The two that I know of so far where it is NOT allowed are (although it is available via SOQL and describe):
- Contact
- Order
It IS allowed on the opportunity though.
Bonus Is there a way to programatically tell in the describe information if the field is not available for a JS merge field and needs to be transformed to Account.Id
Also any links to documentation would be helpful.
custom-button describefieldresult
May be a basic question but I could not find specific documentation and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript button.
In these cases one would have to use {!Account.Id}
.
The two that I know of so far where it is NOT allowed are (although it is available via SOQL and describe):
- Contact
- Order
It IS allowed on the opportunity though.
Bonus Is there a way to programatically tell in the describe information if the field is not available for a JS merge field and needs to be transformed to Account.Id
Also any links to documentation would be helpful.
custom-button describefieldresult
custom-button describefieldresult
edited 49 mins ago
Eric
asked 2 hours ago
EricEric
44.9k750120
44.9k750120
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
May be a basic question but I could not find specific documentation
and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript
button.
Task, Event, Quote, Contact, and Order.
Bonus Is there a way to programatically tell in the describe
information if the field is not available for a JS merge field and
needs to be transformed to Account.Id
No. They describe like any other field, and don't have any special flags that indicate anything's different.
Also any links to documentation would be helpful.
I agree. However, as far as I can tell, there is not, and never has been. If it did exist, I have not found it. I believe it has to do with a limitation in the merge syntax for URLs. Unlike newer technology in Salesforce, you can't go across relationship names, so salesforce.com implemented a bunch of convenience fields.
For example, you can't say {!Case.Account.Name}
because of the no-relationship rule, but instead Salesforce allows you to write {!Account.Name}
. You'll also notice other oddities, like instead of {!Case.Owner.FirstName}
you can write {!Case.OwnerFirstName}
. Unfortunately, the best I can say is that you have to use the UI to know for certain if a field will be recognized.
AccountId works on case. Thanks for the Event and Task.
– Eric
55 mins ago
@Eric Oh, I just assumed you'd checked it. I'll amend that then. It's a very small list of magic fields.
– sfdcfox
51 mins ago
Ahh, mistype in my question, it should be contact not case. I'll fix it. Glad to know it is a small list. One of those things you just need to be aware of I guess.
– Eric
49 mins ago
@Eric I knew it was one of those "C" objects, at any rate. Hopefully no more of them will appear (I checked WorkOrder, thinking it might not have it, but it does), so that should be the entire list.
– sfdcfox
42 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "459"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f248435%2fwhen-is-the-accountid-field-not-available-as-a-merge-field-for-js-buttons%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
May be a basic question but I could not find specific documentation
and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript
button.
Task, Event, Quote, Contact, and Order.
Bonus Is there a way to programatically tell in the describe
information if the field is not available for a JS merge field and
needs to be transformed to Account.Id
No. They describe like any other field, and don't have any special flags that indicate anything's different.
Also any links to documentation would be helpful.
I agree. However, as far as I can tell, there is not, and never has been. If it did exist, I have not found it. I believe it has to do with a limitation in the merge syntax for URLs. Unlike newer technology in Salesforce, you can't go across relationship names, so salesforce.com implemented a bunch of convenience fields.
For example, you can't say {!Case.Account.Name}
because of the no-relationship rule, but instead Salesforce allows you to write {!Account.Name}
. You'll also notice other oddities, like instead of {!Case.Owner.FirstName}
you can write {!Case.OwnerFirstName}
. Unfortunately, the best I can say is that you have to use the UI to know for certain if a field will be recognized.
AccountId works on case. Thanks for the Event and Task.
– Eric
55 mins ago
@Eric Oh, I just assumed you'd checked it. I'll amend that then. It's a very small list of magic fields.
– sfdcfox
51 mins ago
Ahh, mistype in my question, it should be contact not case. I'll fix it. Glad to know it is a small list. One of those things you just need to be aware of I guess.
– Eric
49 mins ago
@Eric I knew it was one of those "C" objects, at any rate. Hopefully no more of them will appear (I checked WorkOrder, thinking it might not have it, but it does), so that should be the entire list.
– sfdcfox
42 mins ago
add a comment |
May be a basic question but I could not find specific documentation
and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript
button.
Task, Event, Quote, Contact, and Order.
Bonus Is there a way to programatically tell in the describe
information if the field is not available for a JS merge field and
needs to be transformed to Account.Id
No. They describe like any other field, and don't have any special flags that indicate anything's different.
Also any links to documentation would be helpful.
I agree. However, as far as I can tell, there is not, and never has been. If it did exist, I have not found it. I believe it has to do with a limitation in the merge syntax for URLs. Unlike newer technology in Salesforce, you can't go across relationship names, so salesforce.com implemented a bunch of convenience fields.
For example, you can't say {!Case.Account.Name}
because of the no-relationship rule, but instead Salesforce allows you to write {!Account.Name}
. You'll also notice other oddities, like instead of {!Case.Owner.FirstName}
you can write {!Case.OwnerFirstName}
. Unfortunately, the best I can say is that you have to use the UI to know for certain if a field will be recognized.
AccountId works on case. Thanks for the Event and Task.
– Eric
55 mins ago
@Eric Oh, I just assumed you'd checked it. I'll amend that then. It's a very small list of magic fields.
– sfdcfox
51 mins ago
Ahh, mistype in my question, it should be contact not case. I'll fix it. Glad to know it is a small list. One of those things you just need to be aware of I guess.
– Eric
49 mins ago
@Eric I knew it was one of those "C" objects, at any rate. Hopefully no more of them will appear (I checked WorkOrder, thinking it might not have it, but it does), so that should be the entire list.
– sfdcfox
42 mins ago
add a comment |
May be a basic question but I could not find specific documentation
and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript
button.
Task, Event, Quote, Contact, and Order.
Bonus Is there a way to programatically tell in the describe
information if the field is not available for a JS merge field and
needs to be transformed to Account.Id
No. They describe like any other field, and don't have any special flags that indicate anything's different.
Also any links to documentation would be helpful.
I agree. However, as far as I can tell, there is not, and never has been. If it did exist, I have not found it. I believe it has to do with a limitation in the merge syntax for URLs. Unlike newer technology in Salesforce, you can't go across relationship names, so salesforce.com implemented a bunch of convenience fields.
For example, you can't say {!Case.Account.Name}
because of the no-relationship rule, but instead Salesforce allows you to write {!Account.Name}
. You'll also notice other oddities, like instead of {!Case.Owner.FirstName}
you can write {!Case.OwnerFirstName}
. Unfortunately, the best I can say is that you have to use the UI to know for certain if a field will be recognized.
May be a basic question but I could not find specific documentation
and I need to find out all objects where:
The accountid field is NOT available as a merge field is a javascript
button.
Task, Event, Quote, Contact, and Order.
Bonus Is there a way to programatically tell in the describe
information if the field is not available for a JS merge field and
needs to be transformed to Account.Id
No. They describe like any other field, and don't have any special flags that indicate anything's different.
Also any links to documentation would be helpful.
I agree. However, as far as I can tell, there is not, and never has been. If it did exist, I have not found it. I believe it has to do with a limitation in the merge syntax for URLs. Unlike newer technology in Salesforce, you can't go across relationship names, so salesforce.com implemented a bunch of convenience fields.
For example, you can't say {!Case.Account.Name}
because of the no-relationship rule, but instead Salesforce allows you to write {!Account.Name}
. You'll also notice other oddities, like instead of {!Case.Owner.FirstName}
you can write {!Case.OwnerFirstName}
. Unfortunately, the best I can say is that you have to use the UI to know for certain if a field will be recognized.
edited 43 mins ago
answered 59 mins ago
sfdcfoxsfdcfox
252k11194433
252k11194433
AccountId works on case. Thanks for the Event and Task.
– Eric
55 mins ago
@Eric Oh, I just assumed you'd checked it. I'll amend that then. It's a very small list of magic fields.
– sfdcfox
51 mins ago
Ahh, mistype in my question, it should be contact not case. I'll fix it. Glad to know it is a small list. One of those things you just need to be aware of I guess.
– Eric
49 mins ago
@Eric I knew it was one of those "C" objects, at any rate. Hopefully no more of them will appear (I checked WorkOrder, thinking it might not have it, but it does), so that should be the entire list.
– sfdcfox
42 mins ago
add a comment |
AccountId works on case. Thanks for the Event and Task.
– Eric
55 mins ago
@Eric Oh, I just assumed you'd checked it. I'll amend that then. It's a very small list of magic fields.
– sfdcfox
51 mins ago
Ahh, mistype in my question, it should be contact not case. I'll fix it. Glad to know it is a small list. One of those things you just need to be aware of I guess.
– Eric
49 mins ago
@Eric I knew it was one of those "C" objects, at any rate. Hopefully no more of them will appear (I checked WorkOrder, thinking it might not have it, but it does), so that should be the entire list.
– sfdcfox
42 mins ago
AccountId works on case. Thanks for the Event and Task.
– Eric
55 mins ago
AccountId works on case. Thanks for the Event and Task.
– Eric
55 mins ago
@Eric Oh, I just assumed you'd checked it. I'll amend that then. It's a very small list of magic fields.
– sfdcfox
51 mins ago
@Eric Oh, I just assumed you'd checked it. I'll amend that then. It's a very small list of magic fields.
– sfdcfox
51 mins ago
Ahh, mistype in my question, it should be contact not case. I'll fix it. Glad to know it is a small list. One of those things you just need to be aware of I guess.
– Eric
49 mins ago
Ahh, mistype in my question, it should be contact not case. I'll fix it. Glad to know it is a small list. One of those things you just need to be aware of I guess.
– Eric
49 mins ago
@Eric I knew it was one of those "C" objects, at any rate. Hopefully no more of them will appear (I checked WorkOrder, thinking it might not have it, but it does), so that should be the entire list.
– sfdcfox
42 mins ago
@Eric I knew it was one of those "C" objects, at any rate. Hopefully no more of them will appear (I checked WorkOrder, thinking it might not have it, but it does), so that should be the entire list.
– sfdcfox
42 mins ago
add a comment |
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f248435%2fwhen-is-the-accountid-field-not-available-as-a-merge-field-for-js-buttons%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown