• Rakesh Kumar
  • NEWBIE
  • 90 Points
  • Member since 2011

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 38
    Replies
If the record was already opened manually from other view (with manual click), and then click on the link, we will not get focus on to that tab
if we open the record through the link and when go click on the same link we will getting the focus.

function openPage(url,name){
    if(sforce.console.isInConsole()){ 
        sforce.console.openPrimaryTab(undefined,url, true, name);
    } else { 
        window.open(url,'_parent'); 
    }
}

reproduce
1. Click on VF link ( List of record )
2. back to detail page of link
3. Click link of same record again 
4. Check debug log and you will find error  'openPrimaryTab: Opening a duplicate tab is not allowed.'

Thanks in Advance
Hi All,

I am facing issue with Napili template implementation in my project.

Problem/Issue
Article list is not displaying in Napili content targeting.

Even i have completed below activities in order to display it.
1. Provide access permission of Acticle type in guest user profile
2. Enable category visibility in Guest site profile
3. Channel is enabled as community and public website in Article content
4. Data category assignment is also completed as 'All'

User-added image
Note : I have three sandboxes but one of it is working fine remaining two is not working eventhough all setup is same.

Please suggest or guide me that i have done any setup mistake or it is salesforce native issue.
Looking forward to hear your openion or help on it.

Regards
Rakesh




 
Dear All,

I don't know why SFDC database table field contain '00?0000' even though on screeen its showing '000000'.
I am wondering about it why it is happening..

Any body can please share such issue.

Thanks
Rakesh
Dear All,

According requirement user can not able to see or search restricted records from in a same custom object.
for that i create a record view list (bucket) and assigned to user profile. Problem is here when user search the records they can see or access those records which is not available into assigned viewl list (bucket). I would like to set a permission according to record viewlist.

Ex: I have 1000 records in a custom object and i want to create 100 records of  bucket (view list) and assign to user according to profile. When user logged in then they can see or access only assigned bucket's records. Bucket filter criteria will be type(custom field) or record Type.

Thanks in Advance.
Rakesh
Hi All,

I would like to create bulk email functionality which will send email to given in contacts. After completion of email send i want to retrieve all email sent status and address that system has sent already in excel or csv file.

Can you share me your idea about email send and download the status of sent email in Excel or CSV file ?

Thanks
Rakesh

Hi Friends

 

I am new in SFDC integration. I have Oracle database and  would like to integrate with Salesforce.com CRM application. i have limited budget for the project so i dont wanna to buy middleware tool (ETL tool).

 

Please suggest me

Is it possible to integrate or interface salesforce and Oracle 10g?

 

The data flow between Oracle and SFDC will be bidirectional.

 

If yes then please give me some suggestion how to develop and implement it.

 

Thanks in Advance

Rakesh

Hi All,

 

Is there any way to implement Parent window tab css to child window tab css dynamically in visualforce page ?

 

My requirement is when parent window tab will change then related child window tab css will change automatically.

 

 

Thanks

Rakesh

Hi All,

 

I would like to capture the lookup field value in the apex controller.

 

VF page

<apex:inputField value="{!Object__c.lookupFiled__c}"/>

 

Apex controller..

 

here i am getting the lookup value as ID but i want to get it as value(Text).

 


Is there any way that we can get it on apex controller.

 

Thanks

Rakesh

Hi all,

 

I have one of requirment related to create dynamic SelectList in Visualforce page.

 

 

Controller...

public map<String,List<SelectOption>> radios = new map<String,List<SelectOption>>();

 

Map looks like :: radios[selRadio1,List1 of opitons,selRadio2,List2 of opitons,selRadio3,List3 of opitons,selRadio4,List4 of opitons];

 

public map<String,List<SelectOption>> getRadioList(){

  retrun radios;

}

 

VF page...

 

<apex:repeat value='{!radioList}' var="sRadio">
<apex:selectRadio value="{!sRadio}">
    <apex:selectOption itemValue="{!radioList[sRadio]}"itemLabel="{!radioList[sRadio]}"/>

</apex:selectRadio>
</apex:repeat>
 
 
when i am repeating it i am getting error at colored place that property is not recoginized .
 
Is there any possibility to create dynamic apex tag related to radios and select list.
 
 
Thanks
Rakesh

Hi all,

 

I would like embed blob images in to PDF in apex code only. My scenario is to create a pdf reciept which contain String and dynamically signature which is a blob image and send it by mail.

 

Is there any idea?

 

Please share to me..

 

Thanks

R.K

Hi all,

 

I have custom VF page and in which i am using onChange javascript action method. According to onchange the dependent Pick list 's value will change.

 

Problem:

If i change the profile permission for Visualforce page/Custome Object as Read Only then it will not work. But if i will give Read and Create Permission for VF/Custome Object then every thing is working Fine.

 

I don't know what is exact problem. If any one has faced such type of issue before then please share it. May be that will help me to understand the root cause.

 

Thanks

R.K

 

Hi all,

 

I want to implement macro and formula in visualforce that can handle the auto deletion of blank rows of excel and auto calculation of cell values. i know macro but i dont know how to implement it.

 

my macro code is ::

 

Public Sub RemoveEmptyRows()
   Dim LastRow As Long, CurrentRow As Long
   Dim EntireRow As Range
   
   LastRow = Cells.Find("*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
   
   For CurrentRow = LastRow To 1 Step -1
      Set EntireRow = Cells(CurrentRow, 1).EntireRow
      If Application.WorksheetFunction.CountA(EntireRow) = 0 Then EntireRow.Delete
   Next CurrentRow

End Sub


 

Is there any idea to implement excel formula or macro during download an excel file to visualforce page?

 

 

Thanks in advance

R.K

Hi all,

 

Urgent,

 

I am getting problem when i download data in excel file to visualforce.I found the reason why its generating an extra spaces on GUI or excel sheet becuase i am iterating a list of Map on the visualforce.if i remove the map that i am iterating within list then i will work fine.

 

Code sample:

 
 List<String> accList = new List<String>();

 acc = new List<Account>();
           if(accList !=null && accList.size() > 0){
            totalRows = accList.size();
            acc = [SELECT id,Segument_nov__c, LastName,FirstName,City_nov__c FROM Account Where id IN :accList order by Region_Code_nov__c, Hospital_Name_Kana_nov__c,Department_Name_nov__c,DR_Kana_nov__c asc];  
           }
               
          for(Integer l=0;l<acc.size();l++){
           for(Integer i=0; i< cpdList.size();i++){
                if(acc[l].id == cpdList[i].Cycle_Plan_Target_vod__r.Cycle_Plan_Account_vod__c){

                     List<String> x_list = new List<String>();
                     
                     if(cpdList[i].Tier_nov__c != null)
                     x_list.add(cpdList[i].Tier_nov__c);
                     else
                     x_list.add('');
                     
                    ksList = [SELECT id, Actual_nov__c, Planned_nov__c,Action_Status_nov__c,LastModifiedDate,Parent_Key_Message_Report_nov__r.name,Parent_Key_Message_Report_nov__c,Cycle_Plan_Target_Name_nov__r.name FROM Key_Message_Status_nov__c where Parent_Key_Message_Report_nov__c =:keyList AND Cycle_Plan_Target_Name_nov__c =:cpdList[i].Cycle_Plan_Target_vod__c];
                    if(ksList !=null && ksList.size() > 0 ){
                        kMap.put(acc[l].id,ksList);
                        x_list.add(String.valueOf(ksList[0].LastModifiedDate));
                    }else{
                        ksList.add(new Key_Message_Status_nov__c());
                        kMap.put(acc[l].id,ksList);
                        x_list.add('');
                    }
                    
                 
                     if(cpdList[i].Cycle_Plan_Target_vod__c != null)
                     x_list.add(cpdList[i].Cycle_Plan_Target_vod__c);
                     else
                     x_list.add('');
                         
                    if(x_list != null && x_list.size()>0)
                    xMap.put(acc[l].id,x_list);
                    
                    break;
                    
                }
             }
           }

 

Visualforce ::

 

 <apex:repeat value="{!ActionRecords}" var="target">
    <tr height="35px" >
      <td  width="60px">{!target.wAc.City_nov__c}</td>
      <td  width="60px">{!target.wAc.Primary_Parent_vod__r.name}</td>
      <td  width="60px">{!target.wAc.Department_Name_nov__c}</td>
      <td  width="60px">{!target.wAc.LastName} {!target.wAc.FirstName}</td>
      <td  width="60px"></td>


      <td  >{!xMap[target.wAc.id][0]}</td>
      <apex:repeat value="{!KeyMessageList}" var="km">
          <td  align="center"   >
           <apex:repeat value="{!kMap[target.wAc.id]}"  var="kms">
                 {!IF(km.id = kms.Parent_Key_Message_Report_nov__c, IF(!ISNULL(kms.Actual_nov__c),kms.Actual_nov__c,kms.Planned_nov__c),'')}
           </apex:repeat>  
           </td>
      </apex:repeat>
 
     <td style="background-color:#e4ecf7">{!xMap[target.wAc.id][1]}</td>
    </tr>

</apex:repeat>

 

 

Note:: If i remove those bold code from visualforce then white space is not generating.i dont know what should i do for it. is there something wrong in my code?

 

Please help me.

 

Thanks

R.K

 

 

 

 

Hi All,

 

I would like to call apex controller method when we move one page to another page. I have to also check data modification on Visualforce page then display Confirm Dailog box. If User Click 'Yes' then modified data get saved in table, if user click  'Cancel'  of dailog box then it will move for next page without any data save.

 

Code Sample::

var flag='false';

   function goPage(pages){
           if(flag=='true'){
               if(confirm('Before move to the next page. Do you want to save modified Status? ')== true){
                saveMePermanent(); // Simaple Javascript Funciton
                nextAfterSave(); // This is apex controller method
            }
        }
           document.getElementById("pNumber").value = pages;
           nextBeforeSave(); // this is apex controller method
   }

 

 

Visual force Page



 <apex:actionFunction name="nextAfterSave" action="{!submitStatus}" />
 <apex:actionFunction name="nextBeforeSave" action="{!next}" />

 

<table >
        <tr>
            <td>
              <apex:panelGrid columns="50">
              <apex:repeat value="{!activePages}" var="pages">
                &nbsp;
                <apex:commandLink onclick="goPage({!pages});" >{!pages}</apex:commandLink>
                
                &nbsp;
              </apex:repeat>
              <input type="hidden" name="pageNumber" value="" id="pNumber"/>
            </apex:panelGrid>
            </td>
            
        </tr>  
    </table>

 

I dont know why its not working. I have seen some sample code also that have written as i have given in sample.

 

Is i am missing something in this code?

Please help me.

 

Thanks in Advance

 

R.K

 

 

Hi all,

 

I want to add bulk values in to query list. That query list have one child list.

 

Code:

 

 queryStr = 'SELECT Field1,Field2, Id, RecordTypeId
                                   (

                                  SELECT childField1,chieldField2,chieldField3
                                    FROM Patient_Survey_Child__r

                                    )
                                FROM Patient_Survey_Parent__c';

 

searchedRecord  =  Database.query(queryStr); 

 

 for(Patient_Survey_Parent__c pst:searchedRecord){
            Integer size = pst.Patient_Survey_Child__r.size();
            date mydate = date.parse('01/01/1900');
            if(size < 6){
                Patient_Survey_Child__c pstGt= new Patient_Survey_Child__c();
                for(Integer j=0;j < 6 - size; j++ ){

                    pstGt.childField1 = 'blank';
                    pstGt.childField2='blank';
                    pstGt.childField3= 'blank';
                }
                pst.add(pstGt); // Here i am getting casting error
            }
   }

 

How can i add value in to child object list?

If i will add it in to list then easy to iterate on my visualforce page as black table data(TD)

 

Please share you idea.

 

Thanks in advance

Hi All,

 

I would like to display the list of territory with all my subordates territory .

 

like

 

    ->MyTerritory

          ->MySubordinate01 Territory

          ->MySubordinate02 Territory

          ->MySubordinate03 Territory

          ->MySubordinate04 Territory

 

Is there any idea to fetch list in apex code and wanna use it on visualfroce page.

 

Thanks in advance

Rakesh

 

Hi All,

 

My requirement is to add dynamic table TD tag in to visualforce. Is it possible to add in to tabl?

Presently i am iterating <apex:repeat > tag and displaying td values. but my table structure is getting distort when records are less than table td.

 

 

Code..

        <apex:repeat value="{!records}" var="psl">

          <tr class="tdata">

                <td>{!psl.name}</td>
                <apex:repeat value="{!psl.Patient_Survey_Trends__r}" var="trends"> 
                     <td width="60">{!trends.Remedy_RCC_nov__c}          </td>
                     <td width="50">{!trends.Dose_1_nov__c}          </td>
                     <td width="70">{!trends.Admin_Start_Date_nov__c}          </td>
                     <td width="50">{!trends.Treatment_Term_RCC_nov__c}          </td>
                </apex:repeat> 

      <tr>

</apex:repeat> 

 

My requierment

 


                <td width="60">Remedy 1         </td>
                <td width="50">Dose 1     </td>
                <td width="70">period  1      </td>
                <td width="50">effectiness1          </td>
                <td width="60">Remedy 2         </td>
                <td width="50">Dose 2     </td>
                <td width="70">period 2       </td>
                <td width="50">effectiness2          </td>
                <td width="60">Remedy 3         </td>
                <td width="50">Dose 3      </td>
                <td width="70">period  3    </td>
                <td width="50">effectiness 3         </td>
                <td width="60">Remedy  4        </td>
                <td width="50">Dose 4      </td>
                <td width="70">period  4      </td>
                <td width="50">effectiness 4         </td>
                 <td width="60">Remedy5          </td>
                <td width="50">Dose 5      </td>
                <td width="70">period 5       </td>
                <td width="50">effectiness5          </td>
                 <td width="60">Remedy  6        </td>
                <td width="50">Dose   6    </td>
                <td width="70">period    6    </td>
                <td width="50">effectiness 6         </td>

 

during iteration i am getting only green formated td value because rest of records are not available in db.

but i would like to iterate all table td even if value is less than actual design table.

 

Is there any idea to iterate it?

 

Please share it.

 

Thanks

Rakesh

Hi All,

 

I wanna submit below matrix of all white and black circles at Controller side using javascript.

I tried one of code like

var success = sforce.apex.execute("NOV_TargetActionClass","submitStatus",{a:kmsID,b:targetID,c:status});

 

My process

 Firstly i am collecting all circles (white & black) by using javascript and then i would like to submit all those recorde using above javascript method.

But its not working propertly.

 

My Matrix Data will be

 

Target NameKM01KM02KM03KM04KM05
Target 1
  ●   
Target 2
 〇   
Target 3
    ●
Target N 〇   〇 

 

Is there any way to submit my collected value using javascript?

Please share your idea.

 

Thanks in Advance

Rakesh

 

Hi All,

 

I would like to create a grid on visualforce page.

 

Like

 

Target                col1                 col2                   col3                 col4                  col5     ............... col..n

T1                       row11              row21              row31              row41              row51              row..n          

T2                       row12              row22              row32              row42              row52              row..n     
T3                       row13              row23              row33               row43             row53               row..n     
T4                       row14              row24              row34                row44            row54                row..n   

  
T..n

 

 

Here i have to display dynamically like row 11,row12,row13,row4 according to col1.

 

Please help me to how to iterate the list in such matrix. if you have any idea about apex code then please share me.

 

 

Thanks in Advance

Rakesh

 

Hi

 

I am getting an error like " semi join sub selects can only query id fields, cannot use : 'Line_nov_usr__c ' ".

I dont know why its giving such type of error.

Is there any miss or need to do apend something here?

 

code will be:

 

SELECT Line_nov__c,Feild_2_nov__c, Field_3_nov__c, Field_4_nov__c FROM Patient_Survey_ONC_nov__c where Line_nov__c In (Select Line_nov_usr__c from user where id='005U0000000onrNIAQ') and Line_nov__c !=null

 

Any clue or idea.

 

Thanks

Rakesh

 

If the record was already opened manually from other view (with manual click), and then click on the link, we will not get focus on to that tab
if we open the record through the link and when go click on the same link we will getting the focus.

function openPage(url,name){
    if(sforce.console.isInConsole()){ 
        sforce.console.openPrimaryTab(undefined,url, true, name);
    } else { 
        window.open(url,'_parent'); 
    }
}

reproduce
1. Click on VF link ( List of record )
2. back to detail page of link
3. Click link of same record again 
4. Check debug log and you will find error  'openPrimaryTab: Opening a duplicate tab is not allowed.'

Thanks in Advance
Hi All,

If the record was already opened manually from other view (with manual click), and then click on the link, we will not get focus on to that tab
if we open the record through the link and when go click on the same link we will getting the focus.


Here is my code

<apex:page standardController="Account">
    <apex:includeScript value="/support/console/22.0/integration.js"/>
    <script type="text/javascript">
        function testOpenPrimaryTab() {
            //Open a new primary tab with the salesforce.com home page in it
            sforce.console.openPrimaryTab(null, '/0019000000lcM34?isdtp=vw', true,'TEST123', openSuccess, '0019000000lcM34');
        }
        var openSuccess = function openSuccess(result) {
            //Report whether opening the new tab was successful
            if (result.success == true) {
                //alert('Primary tab successfully opened');
            } else {
                //alert('Primary tab cannot be opened');
            }
        };
     </script>
    <table>
        <tr><td><A HREF="#" onClick="testOpenPrimaryTab();return false"> With PrimaryTab</A>  </td></tr>
    </table>
</apex:page>


 
Dear All,

I don't know why SFDC database table field contain '00?0000' even though on screeen its showing '000000'.
I am wondering about it why it is happening..

Any body can please share such issue.

Thanks
Rakesh
Hi All,

I would like to create bulk email functionality which will send email to given in contacts. After completion of email send i want to retrieve all email sent status and address that system has sent already in excel or csv file.

Can you share me your idea about email send and download the status of sent email in Excel or CSV file ?

Thanks
Rakesh

Hi,

 

I just uploaded 3000 more lead records in my salesforce instance. After insersion I find out the duplicate lead records with same phone number.now i want to delete the duplicate records based on phone number and also Industry criteria.

is it possible to do using do while loop in the trigger.if it is  possible means please send me an example code.

i am creating user record through apex ..

using following code :

 

Profile p = [select id from Profile where name='Standard User'];

User u = new User(alias = 'utest', email='kiran_machhewar@persistent.co.in',
emailencodingkey='UTF-8', firstName='First', lastname='Last', languagelocalekey='en_US',
localesidkey='en_US', profileid = p.id,
timezonesidkey='Europe/London', username='kiran_machhewar1234@persistent.co.in');

insert u;

 

 

but i am nor receiving password reset link ??

can i set my password in code itself ??

  • February 07, 2013
  • Like
  • 0

I'm trying to upsert an Object that has required Picklist Fields.

 

I've written code that constructs a list of Ooportunities objects that I want to upsert in an Apex controller:

 

public List<Opportunity> DonationData = new List<Opportunity>();
upsert DonationData;

 

But there's a required Picklist field called Stage in the Opportunity Object and I must load this field or the upsert operation fails with this error:

 

Error:
Required fields are missing: [Opportunity Name, Stage]

 

The Stage field is not important to me, and so. I have been trying put stub data in it:

* Integers 0 & 1 don't work

* String 'Close Won' doesn't work

 

There is no PickList object, to my knowledge, so there are no Picklist methods.

 

QUESTION: How do you assign a picklist value programmatically?

 

Hi all,

 

I have custom VF page and in which i am using onChange javascript action method. According to onchange the dependent Pick list 's value will change.

 

Problem:

If i change the profile permission for Visualforce page/Custome Object as Read Only then it will not work. But if i will give Read and Create Permission for VF/Custome Object then every thing is working Fine.

 

I don't know what is exact problem. If any one has faced such type of issue before then please share it. May be that will help me to understand the root cause.

 

Thanks

R.K

 

Hi all,

 

I want to add bulk values in to query list. That query list have one child list.

 

Code:

 

 queryStr = 'SELECT Field1,Field2, Id, RecordTypeId
                                   (

                                  SELECT childField1,chieldField2,chieldField3
                                    FROM Patient_Survey_Child__r

                                    )
                                FROM Patient_Survey_Parent__c';

 

searchedRecord  =  Database.query(queryStr); 

 

 for(Patient_Survey_Parent__c pst:searchedRecord){
            Integer size = pst.Patient_Survey_Child__r.size();
            date mydate = date.parse('01/01/1900');
            if(size < 6){
                Patient_Survey_Child__c pstGt= new Patient_Survey_Child__c();
                for(Integer j=0;j < 6 - size; j++ ){

                    pstGt.childField1 = 'blank';
                    pstGt.childField2='blank';
                    pstGt.childField3= 'blank';
                }
                pst.add(pstGt); // Here i am getting casting error
            }
   }

 

How can i add value in to child object list?

If i will add it in to list then easy to iterate on my visualforce page as black table data(TD)

 

Please share you idea.

 

Thanks in advance

Hi All,

 

I wanna submit below matrix of all white and black circles at Controller side using javascript.

I tried one of code like

var success = sforce.apex.execute("NOV_TargetActionClass","submitStatus",{a:kmsID,b:targetID,c:status});

 

My process

 Firstly i am collecting all circles (white & black) by using javascript and then i would like to submit all those recorde using above javascript method.

But its not working propertly.

 

My Matrix Data will be

 

Target NameKM01KM02KM03KM04KM05
Target 1
  ●   
Target 2
 〇   
Target 3
    ●
Target N 〇   〇 

 

Is there any way to submit my collected value using javascript?

Please share your idea.

 

Thanks in Advance

Rakesh

 

Hi All,

 

I would like to create a grid on visualforce page.

 

Like

 

Target                col1                 col2                   col3                 col4                  col5     ............... col..n

T1                       row11              row21              row31              row41              row51              row..n          

T2                       row12              row22              row32              row42              row52              row..n     
T3                       row13              row23              row33               row43             row53               row..n     
T4                       row14              row24              row34                row44            row54                row..n   

  
T..n

 

 

Here i have to display dynamically like row 11,row12,row13,row4 according to col1.

 

Please help me to how to iterate the list in such matrix. if you have any idea about apex code then please share me.

 

 

Thanks in Advance

Rakesh

 

Hi,

  I have Territory management enabled on my production org.

I need to migrate it to my sandboxes for the purpose of deployment

How do I do this?

 

Thanks

I have an inputfield of type picklist. The picklist has the following values:
Cancelled
Draft
Pending
Completed
OnHold
 
I need to select one of the values(e.g. Draft) as the default value whenever the new page is opened.
 
I tried marking Draft option as the default value in Picklist values. However it does not work.
 
Please suggest.
  • October 21, 2008
  • Like
  • 0