• vi
  • NEWBIE
  • 0 Points
  • Member since 2006

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

Error Message:

duplicate value found: <unknown> duplicates value on record with id: <unknown>

Description of conditions causing this error:

I deleted a row (via saleforce tab) and then attempt to insert a new record (via API) that has the same value, for the unique field, as the deleted row.

 I have emptied the recycling bin.

  • January 27, 2007
  • Like
  • 0
The ultimate goal is to make an account record readonly based on a field value, rather that having to set a record type....
 
The following is an excerpt from the salesforce online help...found by searching for "recordtype" :
 
How do I change field properties (read Only, required) with an sControl?
Custom S-controls can be used to change the record type of a record, so as to change the page layout of a record which in turn can change the field properties for the record.
The basics are that the S-control would allow the user switch the record type behind the scenes, which would change the layout.

An example of changing the layout for an object. To use this you will provide:
<RECORD_TYPE_ID> - This is the record type of your desired layout.
<RECORD_ID> -_This is the merge field giving the ID of your record.

NOTE: This will only work in Enterprise Edition and Developer Edition since they are the only versions with Record Types.

<-----START JAVASCRIPT FUCTION------>

function redirect() {
parent.frames.location.replace("/<RECORD_ID>/s?retURL=<RECORD_ID>&RecordType=<RECORD_TYPE_ID>&cancelURL=<RECORD_ID>");
}
redirect();

so for instance, with a Lead object:

function redirect() {
parent.frames.location.replace("/{!Lead_ID}/e?retURL={!Lead_ID}&RecordType=012300000000O8c&cancelURL={!Lead_ID}");
}
redirect();
 
Can (and if so, how) this code be used such that when the details for an account are displayed, then if the account's custom field "ClientStatus__c" = "Active" the record type is set to a Recordtype for which the layout used will not have the edit button available? Would this actually change the RecordType for the account in the database or would it just appear to have the readonly RecordType when the details page is displayed?
 
 
  • January 24, 2007
  • Like
  • 0
I have created an scontrol and have set the scontrol as the override for the Edit button.
 
At present I simply want to display an Alert with the Account.Id value, but I do not seem to be able to get the Account.Id value.
 
If i use the line,  alert("Account ID = ");  
Then I get an alert box to pop up and the View page for the account re-displays properly.
 
If I use the line, alert("Account ID = " + {!Account.Id});
Then no alert box is displayed and the View page goes blank. It is as if the Account.Id is nothing/non-existant.
 
How can I display the Account.Id?
 
Thanks.
 
 
Here is the scontrol code:
 
<html>
<head>
<script src="/soap/ajax/8.0/connection.js">
</script>
<script>
function init()
{
var s
alert("Account ID = " + {!Account.Id}); //this does not work
alert("Account ID = "); //this works
this.parent.location.href = "{!URLFOR($Action.Account.View, Account.Id)}";
}
</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>
  • January 22, 2007
  • Like
  • 0

Error Message:

duplicate value found: <unknown> duplicates value on record with id: <unknown>

Description of conditions causing this error:

I deleted a row (via saleforce tab) and then attempt to insert a new record (via API) that has the same value, for the unique field, as the deleted row.

 I have emptied the recycling bin.

  • January 27, 2007
  • Like
  • 0
I have created an scontrol and have set the scontrol as the override for the Edit button.
 
At present I simply want to display an Alert with the Account.Id value, but I do not seem to be able to get the Account.Id value.
 
If i use the line,  alert("Account ID = ");  
Then I get an alert box to pop up and the View page for the account re-displays properly.
 
If I use the line, alert("Account ID = " + {!Account.Id});
Then no alert box is displayed and the View page goes blank. It is as if the Account.Id is nothing/non-existant.
 
How can I display the Account.Id?
 
Thanks.
 
 
Here is the scontrol code:
 
<html>
<head>
<script src="/soap/ajax/8.0/connection.js">
</script>
<script>
function init()
{
var s
alert("Account ID = " + {!Account.Id}); //this does not work
alert("Account ID = "); //this works
this.parent.location.href = "{!URLFOR($Action.Account.View, Account.Id)}";
}
</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>
  • January 22, 2007
  • Like
  • 0
I am trying to add a value to a LOOKUP field from a API. It for some reason wont add the value
 
the LOOKUP field is holding a name so i'm supplying it "first last"
 
am i doing anything wrong? the syntax is correct.