Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cw = window.open('/apex/CreateSample?scontrolCaching=1&id={!Servicio__c.Id}', 'Crear Muestra', "height=450,width=600");
- (function detectUnload() {
- window.setTimeout(function(){
- if (cw == null || cw.closed) {
- window.location.reload();
- return;
- }
- detectUnload();
- }, 100);
- })();
- if ({!Servicio__c.State__c}== "Complete")
- {
- (var cw = window.open('/apex/CreateSample?scontrolCaching=1&id={!Servicio__c.Id}', 'Crear Muestra', "height=450,width=600");
- (function detectUnload() {
- window.setTimeout(function(){
- if (cw == null || cw.closed) {
- window.location.reload();
- return;
- }
- detectUnload();
- }, 100);
- })();)
- }
- else
- {
- alert("You can not do this");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement