• sk3501.3915272120779841E12
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 21
    Replies
Hi, I want to fetch 1 lacs record in the list view in single vf page. How do i acheive this i am getting governer limit. I am thinking to fetch records on mouse scrol using jquery. How to acheive this if anyone has some idea then please let me know and one more thing i don't want to do this using pagination.
Hi, I am using an image link inside button like given below, and want do disable button on some event but i am not able to disable this. Please help me if you know this. I need this to disable using jquery.

<<button id="btn1" type="button"><img height="16px" src="/resource/myImg" width="16px"></button>
Hi,
I am creating a report on Activity. It will show all the Call Log in given time period and all the Email as well.
Now i want to separete both of them. I want to see only the Call Log in report. But it is showing me Email as well.

I am trying to filter both as Activity type but it is not showing.

How to separate both Call Log and Email in report. Please help me as soon as possible.
Hi,
I am using a custom button on lead detail page i.e. pop up and creating a pop window using javascript. That pop window has visualforce page to create new task. When i save the task it redirects me to task detail page. while i want when i click on save it redirect me to lead detail page and show the new task in open activity. please help me how do i redirect to lead detail page.

javascript code i am using on the custom button is given below:
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')} 
{!REQUIRESCRIPT('/js/functions.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/jquery-1.8.2.min.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/ui/jquery-ui-1.9.1.custom.min.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/postmessage/jquery.ba-postmessage.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/bbq/jquery.ba-bbq.min.js')} 
requireCssFile('/resource/jQueryForPopup/jQuery/ui/css/ui-lightness/jquery-ui-1.9.1.custom.min.css'); 
function requireCssFile(filename) 

var fileref = document.createElement('link'); 
fileref.setAttribute('rel', 'stylesheet'); 
fileref.setAttribute('type', 'text/css'); 
fileref.setAttribute('href', filename); 
document.getElementsByTagName('head')[0].appendChild(fileref); 


var j$ = jQuery.noConflict(); 
var iframe_url = '{!URLFOR("/apex/vfPopup")}'; 
var child_domain = iframe_url.substring(0, iframe_url.indexOf('/', 9)); 
var parent_domain = window.location.protocol + '//' + window.location.host; 
var j$modalDialog = j$('<div id="opppopup"></div>') 
.html('<iframe id="iframeContentId" src="' + iframe_url + '" frameborder="0" height="100%" width="100%" marginheight="0" marginwidth="0" scrolling="no" />') 
.dialog({ 
autoOpen: false, 
title: 'Sample Popup', 
resizable: true, 
width: 800, 
height: 540, 
autoResize: true, 
modal: true, 
draggable: true 
}); 

j$modalDialog.dialog('open');

Visualforce code is given below:

<apex:page standardController="Task" sidebar="false">
    <apex:form >
      
        <apex:pageBlock title="Edit Task" id="thePageBlock" mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}" onComplete="closeModalDialog();"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>              
            </apex:pageBlockButtons>
            <apex:actionRegion >
                <apex:pageBlockSection title="Basic Information" columns="1">
                <apex:inputField value="{!Task.Ownerid}"/>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="Subject"/>
                            <apex:inputField value="{!Task.Subject}"/>
                    </apex:pageBlockSectionItem>
                    <apex:inputField value="{!Task.whoid}"/>
                    <apex:inputField value="{!Task.whatid}"/>
                </apex:pageBlockSection>
            </apex:actionRegion>

        </apex:pageBlock>
    
    </apex:form>
    <script type="text/javascript">
          
        function closeModalDialog() {
            var cross_result = new Object();
            cross_result.action = 'close_modal_dialog';
         
            if (cross_result.action == 'close_modal_dialog') {
            j$modalDialog.dialog('close');
            }
        } 
    </script>
    <!--<script>
        var returnURL;

        window.onload =  function(){
        returnURL = gup('retURL');
        //alert('Set retURL = ' + returnURL);
        
        };
        
        function gup( name ){  //this function just grabs HTTP params by 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 redirectBack(){
        //alert('Sending you back to ' + returnURL);
        window.location.href = '/' + returnURL;
        }
    </script>-->
</apex:page>
Hi i would like to create test class for this class please let me know how to create test class for this class.

global class BatchHelperForMigrationData{
    global BatchHelperForMigrationData(){
    }
    global BatchHelperForMigrationData(AsyncApexJob a, String cls){
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {a.Createdby.Email};
        mail.setToAddresses(toAddresses);
        mail.setSubject('Record Transefer Status: '+a.status);
        mail.setPlainTextBody('The Batch Apex job processed for '+cls + ' Total Success '+a.TotalJobItems +
            ' batches with '+a.NumberOfErrors + ' failures. ');
        Messaging.sendEmail(New Messaging.SingleEmailMessage[] {mail});    
    }
}
Hi, I am converting lookup field to master-detail but the master-detail type is invisible. I am not able to select the master-detail type in my object.
I am explaining the senario. i have total 5 object let's count as obj1,obj2,obj3,obj4,obj5. And obj1 is a master of obj2,obj3. And obj2 is master of obj4. Now i converting a lookup field of obj2 to master-detail but master-detail type is not visible. Please help me as soon as possible...
Hi, 
I am running a batch class from annonymous window and my code looks like this.

String query = 'select id, name, Book_Title,'+
                       'Book_Author__c, Price__c from Book__c';
BatchClassConstructor b = new BatchClassConstructor(query);
Database.executeBatch(b);

Now when i am running the batch i am getting System.QueryException: unexpected token: id;
Please help
Hi, i want to transfer record from one object to another object in same org. Below is my coding i want to do this using batch apex, i am almost successful exception name no other record is deploying, please help and rectify whether i am wrong.

global class RecordTransfer implements database.batchable<sObject>{
    global final String Query;
    
    global RecordTransfer(String q){
        Query = q;
    }
    global Database.queryLocator start(Database.BatchableContext BC){
        //Query = 'Select id, Book_Title__c from Book__c';
        return Database.getQueryLocator(Query);
    }
    
    global void execute(Database.BatchableContext BC, List<sObject> scope){
        Set<String> setFields = new Set<String>{'name','Book_Title__c','Description__c'};
        Map<String, Schema.sObjectField> schemaFieldMap = Schema.sObjectType.Book__c.fields.getMap();
        List<BookTwo__c> accList = new List<BookTwo__c>();
        
        for(sObject s : scope){
            BookTwo__c tempBook = new BookTwo__c();
            for(String fieldName:schemaFieldMap.keySet()){
                
                    if(setFields.contains(fieldName)){
                        tempBook.put(fieldName,s.get(fieldName));
                        System.debug('????? tempBook '+tempBook);
                    }
            }
            accList.add(tempBook);
            system.debug('????? accList '+accList);
        }
        insert accList;
    }
    
    global void finish(Database.BatchableContext BC){
        AsyncApexJob a = [Select Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email From AsyncApexJob Where Id=:BC.getJobId()];
        
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {a.Createdby.Email};
        mail.setToAddresses(toAddresses);
        mail.setSubject('Record Transefer Status: '+a.status);
        mail.setPlainTextBody('The Batch Apex job processed '+a.TotalJobItems +
            ' batches with '+a.NumberOfErrors + ' failures. ');
        Messaging.sendEmail(New Messaging.SingleEmailMessage[] {mail});
    }
}
Hi,

My org has overall code coverage 85%, but while creating a package, i am uploading it but it is giving only 47% code coverage.

Can i know the reason?
I have created a Package that is managed released. And i have installed it on other dev org. My all the classes and pages are functioning well but i am getting some error in one of my page.

I got why it is giving error. Now i have to do some modification in the one of the class in the Org where i created the managed released package and i did that. But my question is now.
1) How will i fix these changes in the installed org?
2) Do i will have to create another released or i can do it by patch or push?
3) If can do it through patch and push upgrades then how?

I am confused what to do next. Please give me some information so that i could go ahead.
Hi,

How to access base extension classes member function which is not made global? Can it be possible to access the member function of base extension class without making it global? One more thing my base extension class is global and it's controller is also global.

Please suggest me how to procceed further.
Hi,

Is that possible to delete the workflow rule which is no loger used from beta managed package.
Hi,

Please anyone can tell me about the patches in the salesforce and why to use the patches.

Hi,

I have a base managed package which i am installing in another dev org and here i am creating extension managed package. Now i have a question that can we use the same namespace as in base managed package.
Hi,

I have a base managed package. This base managed package contains only the objects and the layouts. Now i am going to create another managed package which contains the apex classes and visualforce pages and other components.

So, here my question is that can we use the same namespace prefix in the second managed package. So far i know that the namespace prefix must be unique. But is there any other way to use the same namespace prefix in my another managed package.

Please suggest!!!
Hi,

I am not able to delete the custom object's field from eclipse. I am deleting the field and when i am trying to save, It's rolling back the changes.

Please anyone knows how to delete the custom objects field.

And also i am using the latest version of Force.com IDE.

Please suggest me as soon as possible.
Hi,

I am getting problem in installation of ant. I am giving path as

C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%;%JAVA_HOME%\bin;%ANT_HOME%\bin\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86


'ant' is not recognized as an enternal and external command, operable program or batch file.

please help me where i am missing.

Hi,

I am getting an error when i am creating an Apex Code. Can anyone please tell me why this error is coming. Below is the error:

Error: Compile Error: sObject type 'DocumentURL__c' is not supported.
Hi,

I am trying to deploy an Object from eclips to dev org and not able to deploy it's giving error. Can any one please tell me why this error is coming.
Below is error:

*** Deployment Log ***
Result: FAILED
Date: April 4, 2014 7:37:01 PM IST


# Deploy Results:
   File Name:    objects/Country__c.object
   Full Name:  Country__c.Country_Currency__c
   Action:  NO ACTION
   Result:  FAILED
   Problem: Entity Country__c not found

   File Name:    objects/Country__c.object
   Full Name:  Country__c.Country_Name__c
   Action:  NO ACTION
   Result:  FAILED
   Problem: Entity Country__c not found

   File Name:    objects/Country__c.object
   Full Name:  Country__c.Country_Postal_Name__c
   Action:  NO ACTION
   Result:  FAILED
   Problem: Entity Country__c not found

   File Name:    objects/Country__c.object
   Full Name:  Country__c.All
   Action:  NO ACTION
   Result:  FAILED
   Problem: Entity 'Country__c' not found.

   File Name:    package.xml
   Full Name:  package.xml
   Action:  UPDATED
   Result:  SUCCESS
   Problem: n/a

# Test Results:
   n/a

Hi,

I have created an application on sandbox. Now i wand to create a managed package. But as we know that we can not make a managed package
in sandbox. So can anyone please suggest me what should i do now.
Hi, I want to fetch 1 lacs record in the list view in single vf page. How do i acheive this i am getting governer limit. I am thinking to fetch records on mouse scrol using jquery. How to acheive this if anyone has some idea then please let me know and one more thing i don't want to do this using pagination.
Hi, I am using an image link inside button like given below, and want do disable button on some event but i am not able to disable this. Please help me if you know this. I need this to disable using jquery.

<<button id="btn1" type="button"><img height="16px" src="/resource/myImg" width="16px"></button>
Hi,
I am using a custom button on lead detail page i.e. pop up and creating a pop window using javascript. That pop window has visualforce page to create new task. When i save the task it redirects me to task detail page. while i want when i click on save it redirect me to lead detail page and show the new task in open activity. please help me how do i redirect to lead detail page.

javascript code i am using on the custom button is given below:
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')} 
{!REQUIRESCRIPT('/js/functions.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/jquery-1.8.2.min.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/ui/jquery-ui-1.9.1.custom.min.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/postmessage/jquery.ba-postmessage.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/bbq/jquery.ba-bbq.min.js')} 
requireCssFile('/resource/jQueryForPopup/jQuery/ui/css/ui-lightness/jquery-ui-1.9.1.custom.min.css'); 
function requireCssFile(filename) 

var fileref = document.createElement('link'); 
fileref.setAttribute('rel', 'stylesheet'); 
fileref.setAttribute('type', 'text/css'); 
fileref.setAttribute('href', filename); 
document.getElementsByTagName('head')[0].appendChild(fileref); 


var j$ = jQuery.noConflict(); 
var iframe_url = '{!URLFOR("/apex/vfPopup")}'; 
var child_domain = iframe_url.substring(0, iframe_url.indexOf('/', 9)); 
var parent_domain = window.location.protocol + '//' + window.location.host; 
var j$modalDialog = j$('<div id="opppopup"></div>') 
.html('<iframe id="iframeContentId" src="' + iframe_url + '" frameborder="0" height="100%" width="100%" marginheight="0" marginwidth="0" scrolling="no" />') 
.dialog({ 
autoOpen: false, 
title: 'Sample Popup', 
resizable: true, 
width: 800, 
height: 540, 
autoResize: true, 
modal: true, 
draggable: true 
}); 

j$modalDialog.dialog('open');

Visualforce code is given below:

<apex:page standardController="Task" sidebar="false">
    <apex:form >
      
        <apex:pageBlock title="Edit Task" id="thePageBlock" mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}" onComplete="closeModalDialog();"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>              
            </apex:pageBlockButtons>
            <apex:actionRegion >
                <apex:pageBlockSection title="Basic Information" columns="1">
                <apex:inputField value="{!Task.Ownerid}"/>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="Subject"/>
                            <apex:inputField value="{!Task.Subject}"/>
                    </apex:pageBlockSectionItem>
                    <apex:inputField value="{!Task.whoid}"/>
                    <apex:inputField value="{!Task.whatid}"/>
                </apex:pageBlockSection>
            </apex:actionRegion>

        </apex:pageBlock>
    
    </apex:form>
    <script type="text/javascript">
          
        function closeModalDialog() {
            var cross_result = new Object();
            cross_result.action = 'close_modal_dialog';
         
            if (cross_result.action == 'close_modal_dialog') {
            j$modalDialog.dialog('close');
            }
        } 
    </script>
    <!--<script>
        var returnURL;

        window.onload =  function(){
        returnURL = gup('retURL');
        //alert('Set retURL = ' + returnURL);
        
        };
        
        function gup( name ){  //this function just grabs HTTP params by 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 redirectBack(){
        //alert('Sending you back to ' + returnURL);
        window.location.href = '/' + returnURL;
        }
    </script>-->
</apex:page>
Hi, I am converting lookup field to master-detail but the master-detail type is invisible. I am not able to select the master-detail type in my object.
I am explaining the senario. i have total 5 object let's count as obj1,obj2,obj3,obj4,obj5. And obj1 is a master of obj2,obj3. And obj2 is master of obj4. Now i converting a lookup field of obj2 to master-detail but master-detail type is not visible. Please help me as soon as possible...
Hi, i want to transfer record from one object to another object in same org. Below is my coding i want to do this using batch apex, i am almost successful exception name no other record is deploying, please help and rectify whether i am wrong.

global class RecordTransfer implements database.batchable<sObject>{
    global final String Query;
    
    global RecordTransfer(String q){
        Query = q;
    }
    global Database.queryLocator start(Database.BatchableContext BC){
        //Query = 'Select id, Book_Title__c from Book__c';
        return Database.getQueryLocator(Query);
    }
    
    global void execute(Database.BatchableContext BC, List<sObject> scope){
        Set<String> setFields = new Set<String>{'name','Book_Title__c','Description__c'};
        Map<String, Schema.sObjectField> schemaFieldMap = Schema.sObjectType.Book__c.fields.getMap();
        List<BookTwo__c> accList = new List<BookTwo__c>();
        
        for(sObject s : scope){
            BookTwo__c tempBook = new BookTwo__c();
            for(String fieldName:schemaFieldMap.keySet()){
                
                    if(setFields.contains(fieldName)){
                        tempBook.put(fieldName,s.get(fieldName));
                        System.debug('????? tempBook '+tempBook);
                    }
            }
            accList.add(tempBook);
            system.debug('????? accList '+accList);
        }
        insert accList;
    }
    
    global void finish(Database.BatchableContext BC){
        AsyncApexJob a = [Select Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email From AsyncApexJob Where Id=:BC.getJobId()];
        
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {a.Createdby.Email};
        mail.setToAddresses(toAddresses);
        mail.setSubject('Record Transefer Status: '+a.status);
        mail.setPlainTextBody('The Batch Apex job processed '+a.TotalJobItems +
            ' batches with '+a.NumberOfErrors + ' failures. ');
        Messaging.sendEmail(New Messaging.SingleEmailMessage[] {mail});
    }
}
I have created a Package that is managed released. And i have installed it on other dev org. My all the classes and pages are functioning well but i am getting some error in one of my page.

I got why it is giving error. Now i have to do some modification in the one of the class in the Org where i created the managed released package and i did that. But my question is now.
1) How will i fix these changes in the installed org?
2) Do i will have to create another released or i can do it by patch or push?
3) If can do it through patch and push upgrades then how?

I am confused what to do next. Please give me some information so that i could go ahead.
Hi,

I have a base managed package. This base managed package contains only the objects and the layouts. Now i am going to create another managed package which contains the apex classes and visualforce pages and other components.

So, here my question is that can we use the same namespace prefix in the second managed package. So far i know that the namespace prefix must be unique. But is there any other way to use the same namespace prefix in my another managed package.

Please suggest!!!
Hi,

Can we deploy the component from sandbox to app exchange. If yes, then please let me know.
Hi,

Can we use Static Resource in the managed package of salesforce.
I am trying to install package in my force.com developer edition org but getting some problem there

Missing Organization Feature: Contract.RecordType
Missing Organization Feature: Chatter

If anyone has idea to resolve this issue then please help me.
Hi,
I have created an custom object product and it has so many field but the problem is that when i am trying to create a test class in which i am inserting date then it is giving error that the field is not writable.
     
     I have used formula in InHometrgtdateminus13days__c = In_Home_Target_Date__c-13
     Products__c ps = new Products__c();
      ps.ms_123postcards__Account__c = comp.id;
      ps.Fulfillment_Status__c = 'Currently in Design';
      ps.In_Home_Target_Date__c = system.today().adddays(13);
      ps.To_Finalize_Design__c = False;
      Ps.Do_not_repeat_finalize_design_task__c = FALSE;
      ps.Receive_New_Agreement__c = system.today().adddays(-1);
      ps.InHometrgtdateminus13days__c = system.today();
      insert ps;

     This error is giving when i am trying to insert ps.InHometrgtdateminus13days__c = system.today();

Can anyone help me to resolve this issue?