• Sweta Agnihotri
  • NEWBIE
  • 50 Points
  • Member since 2011

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

Hi

 

I am new to visualforce pages so I decided to work through the Visualforce Developer's Guide examples, I am having a bit of a problem with the apex inlineEdit command, I just can't get it to work. I have done the following

 

<apex:page standardcontroller="Account">
    <apex:detail subject="{!account.id}" relatedList="false" inlineEdit="true"/>
</apex:page>

 

I have tried putting <apex:form> </apex:form> around the detail but this has no effect either.

 

Have I forgotten to turn something on?

Thank you.


  • September 16, 2011
  • Like
  • 0

When you drag the standard field into a standard layout of the contact object it displays the name of the user who created the record and the date & time of creation.

 

When I used it in a vf page all it shows is 005200000025bX9AAI?

 

Tried <apex:outputlabel value="{!contact.CreatedBy}"/>, <apex:outputText >{!contact.CreatedBy}</apex:outputText> as two ways to display it with the same results.

 

Any idea's whats wrong and how I get it to do the  same as it would in a normal layout.

 

Thanks

Hi,

 

As you are aware that when we delete a record, we get a pop-up (salesforce's standard functionality) which confirms that if we really want to delete the record.

However, if you delete a Task you don't get any pop-up. So we wanted to show the pop-up on task delete event as well.

 

I implemented this requirement by overriding the "Delete" button with a Visualforce page.

Within the visualforce made use of AJAX.

<apex:page standardController="Task">

<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>

<script src="../../soap/ajax/20.0/connection.js" type="text/javascript"></script>

<script type="text/javascript">
window.onload = loadOnClick;

/*
Function Name : gup
Description: To get the value of a parameter in the URL
*/
function gup( name )
{ 
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
	var regexS = "[\\?&]"+name+"=([^&#]*)";  
	var regex = new RegExp(regexS );
	var results = regex.exec( window.location.href );  
	if( results == null )    
		return "";  
	else    
		return results[1];
}

/*
Function Name : gup
Description: Gets called on Delete button click. 
*/
function loadOnClick()
{     
	try{         
		var answer = confirm('Delete the Record?');         
		var taskRecordId = gup('delID');          
		if(answer)          
		{                       
			var delResult = sforce.connection.deleteIds([taskRecordId ]);               
			window.location='/home/home.jsp';          
		}else
		{                
			window.location='/'+taskRecordId;         
		}    
	}catch(err)
	{	
		alert(err);
	}
}

</script>

</apex:page>

 

 

 

 

Hi Everyone,

 

I need to import list of contacts from an Excel sheet into Salesforce.I have Professional edition. API is not enabled in Professional edition,so data loader will not work. Which other tool can I use to import alist of contacts from an Excel sheet into Salesforce Professionaledition?

 

Thanks,

Rajiv

  • September 17, 2011
  • Like
  • 0

Hi

 

I am new to visualforce pages so I decided to work through the Visualforce Developer's Guide examples, I am having a bit of a problem with the apex inlineEdit command, I just can't get it to work. I have done the following

 

<apex:page standardcontroller="Account">
    <apex:detail subject="{!account.id}" relatedList="false" inlineEdit="true"/>
</apex:page>

 

I have tried putting <apex:form> </apex:form> around the detail but this has no effect either.

 

Have I forgotten to turn something on?

Thank you.


  • September 16, 2011
  • Like
  • 0

When you drag the standard field into a standard layout of the contact object it displays the name of the user who created the record and the date & time of creation.

 

When I used it in a vf page all it shows is 005200000025bX9AAI?

 

Tried <apex:outputlabel value="{!contact.CreatedBy}"/>, <apex:outputText >{!contact.CreatedBy}</apex:outputText> as two ways to display it with the same results.

 

Any idea's whats wrong and how I get it to do the  same as it would in a normal layout.

 

Thanks

Hi,

 

As you are aware that when we delete a record, we get a pop-up (salesforce's standard functionality) which confirms that if we really want to delete the record.

However, if you delete a Task you don't get any pop-up. So we wanted to show the pop-up on task delete event as well.

 

I implemented this requirement by overriding the "Delete" button with a Visualforce page.

Within the visualforce made use of AJAX.

<apex:page standardController="Task">

<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>

<script src="../../soap/ajax/20.0/connection.js" type="text/javascript"></script>

<script type="text/javascript">
window.onload = loadOnClick;

/*
Function Name : gup
Description: To get the value of a parameter in the URL
*/
function gup( name )
{ 
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
	var regexS = "[\\?&]"+name+"=([^&#]*)";  
	var regex = new RegExp(regexS );
	var results = regex.exec( window.location.href );  
	if( results == null )    
		return "";  
	else    
		return results[1];
}

/*
Function Name : gup
Description: Gets called on Delete button click. 
*/
function loadOnClick()
{     
	try{         
		var answer = confirm('Delete the Record?');         
		var taskRecordId = gup('delID');          
		if(answer)          
		{                       
			var delResult = sforce.connection.deleteIds([taskRecordId ]);               
			window.location='/home/home.jsp';          
		}else
		{                
			window.location='/'+taskRecordId;         
		}    
	}catch(err)
	{	
		alert(err);
	}
}

</script>

</apex:page>