You need to sign in to do that
Don't have an account?

Getting the current logged in user and account info
I have created a custom object which is related to Account object.
Whenever I want to create the new custom object record I need to insert the acount id also.
But how can I retrieve the current logged in account info or user info.
What I am trying to do is creating a s-control to override the new entry form with our UI and submitting the data to salesforce using salesforce objects.
Thanks in advance.
Thanks for your response.
I have created a scontrol with textboxes and a submit button and on submit click calling the salesforec object to insert new record as below
<html>
<head>
<script src="/soap/ajax/12.0/connection.js" type="text/javascript"></script>
<script type="text/javascript">
function add()
{
var account = new sforce.SObject("PFUDocument__c");
account.Doc_Url= "http://www.test.com";
account.Title= "test333";
account.Account = 123;
var result = sforce.connection.create([account]);
if (result[0].getBoolean("success")) {
log("account with id " + result[0].id + " updated");
} else {
log("failed to update account " + result[0]);
}
</script>
</head>
<body bgcolor=#f3f3ec>
url
<input type="text" id="url" value=""/>
title
<input type="text" id="title" value=""/>
<input type="submit" id="save" onClick="add();"/>
</body>
</html>
The only issues with the merge fields that werewolf explains is if the field contains multiple lines, like a two lined street address. This will cause errors when your s-control runs. The easiest way to work around this is to query the record with the value placing the field in a variable instead of using the merge field. By not displaying it in the code it prevents the \n from messing with it.