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

Popup message using JavaScript
Hi friends,
I have a Session object and Session Line Item object (They are associated with lookup relationship, where Session is master and session line item is child),
I am displaying List of session records in visualforce page using <apex:pageblocktable>
I am also using Edit and delete functionality using commandbutton,
my requirement is that "I want to restrict user to Edit any Session if any child record is associated with this" so when a user clicks on Edit button a popup should apper with message "You can not Edit this session".
How to acheive this functionality?
<apex:commandButton value="Edit" action="{!editSession}" reRender="hiddenBlock10"> <apex:param name="param1" value="{!Session.id}" assignTo="{!strSessionId}"></apex:param> </apex:commandButton>
public pagereference editSession() { Pagereference p=new Pagereference('/apex/EditSession?id='+strSessionId); p.setRedirect(true); return p; }
Thanks,
Amit Singh
I got the solution for this requirement,
here is the solution,
Thank you !!!