• Sharmila Sahoo
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 9
    Replies
I have created one workflow rule on a custom object to change record owner to queue.I have selected notify assignee checkbox while assigning record to queue. But I am not receiving any notification email.
User-added image

In queue, I have kept Queue Email and Send Email to members checkbox blank since I have read from post that if both of the fields are blank then all queue members will by default receive notification if record is assigned to queue.
User-added image
I have assigned myself as queue member. My email id is valid but I  have not received any notification when record owner is changed to queue.

Please help in this.
Record type selection screen is not coming if I am clicking on New button on related list. But it is coming if I am creating new record from available tab.

We have one sample request object and its child object(sample product). When I am clicking on new button(sample product) on related list of sample request, it is directly going to default record type and record type selection screen is not coming.
User-added image
But if I am directly creating sample product record from tab, record type selection screen is coming.
User-added image
Please help . I am not able to understand why record type selection option is not  available while creating records from related list.
 
I have created one workflow rule to populate one field(workflow field update)  if it is blank,but it is getting populated with WFR even if I am manually entering data in that field.
Workflow rule:
User-added image
Workflow Field Update:
User-added image
I am not able to understand I am entered criteria to check if Street field is null, then only it should trigger. Why it is overriding values that I have entered manually in street field with Workflow field update.
Please help. 
created date on case UI is displaying 5/9/2018 date but in backend created date is showing value 6/9/2018 When I  am querying through developer console. I have one workflow rule to calculate Target date depending on Created Date. Since in backend created date is 6/9/2018, target value is getting calculated incorrectly. Dates are working correctly if created before 6 pm but we are facing discrepency in created date if cases are created after 6 pm. Created Date is coming as next days date.

Example of Case after 6 PM.
User-added image
select createdDate from Case where id='5001h000002br24'
2018-09-06T04:04:08.000+0000

Workflow rule to calculate Target_Date depends on Created Date. So, It is also populating incorrect value.
User-added image

Case created before 6 PM.
User-added image
select createdDate from Case where id='5001h000002br6G'
2018-09-06T07:30:11.000+0000

Any help will be appreciated since many users are getting affected due to it.Target date depends on created date . How to solve this issue.
Please find below VF page Code.

<apex:page sidebar="false" showHeader="false" standardStyleSheets="false">
 <head>
 <script type="text/javascript">
    function hideChatterFeed(){
        var isFeedShown =
            document
                    .getElementById('hideFeedLink')
                    .style
                    .display == 'none' ? false:true;

        if(isFeedShown && chatter){
            if(sfdcPage.entityId){
                chatter.getFeed().toggle(
                    '{"subjectId":"' + sfdcPage.entityId + '","feedType":"ENTITY"}'
                );
            }
            else{
                chatter.getFeed().toggle(
                    '{"subjectId":"","feedType":"NEWS"}'
                );           
            }
        }
    }

    document.onreadystatechange = hideChatterFeed;
</script>
 
 </head>
 
</apex:page>

User-added image

But It is not working. Please help.
 
User-added image
I have created User Samantha and created roles and profile as specified. I have also created opp as mentioned and created sharing rules. But still I am getting exception.
Please help to solve this issue.
//Function in Visualforce Page

function getChildRecordsForLeftNavigation(recordId)
                {   var recordIdTemp=recordId;

                    var wrapper = new Object();

                    alert(recordId);


                    Visualforce.remoting.Manager.invokeAction(
                                                        '{!$RemoteAction.iNeed_MyTravelDetailsController.getChildRecordsForLeftNavigationDisplay}',
                                                           recordIdTemp, 
                                                        function(result, event)
                                                        {
                                                            if (event.status)
                                                            {

                                                                console.log(result); 

                                                            } else if (event.type === 'exception') 
                                                            {

                                                                console.log(event.message); 
                                                            } else
                                                            {

                                                                 console.log(event.message); 
                                                                  console.log(event.where); 
                                                            }
                                                        }, 
                                                        {escape: true}
                                                            );
                }

> 












// Method Call in Visualforce Page In this temp is Wrapper class object


 <apex:outputpanel rendered="{!(temp.travelDocWrapperList.size!=0 || temp.sfdcObject['Article_Number__c']!='')}">
                                                                <apex:outputLink value="{!$Page.iNeed_MyTravelDetails}" rendered="{!Not(temp.docRecordId==$CurrentPage.parameters.SelectedHeader)}" onclick="javascript:getChildRecordsForLeftNavigation('{!temp.docRecordId}');"  >  {!temp.docTitle}
                                                                   <apex:param name="SelectedHeader" value="{!temp.docRecordId}"/> 
                                                               </apex:outputLink>
                                                                <apex:outputText value="{!temp.docTitle}" rendered="{!(temp.docRecordId==$CurrentPage.parameters.SelectedHeader)}"/>
                                                           </apex:outputpanel>











//Remote Method in Controller Class

@RemoteAction
    global static List<TravelDocumentWrapper> getChildRecordsForLeftNavigationDisplay(Id pickAvailObjId) {
        system.debug('inside remote method');
        system.debug('pickAvailObjId in global method'+pickAvailObjId);
        //system.debug('contentId in remote method'+iNeed_MyTravelDetailsController.contentId);

        User us=[Select ContactId from User Where Id=:UserInfo.getUserId()];

        System.debug('User Value in remote method' +us);
        System.debug('User Contact in remote method ' +us.ContactId);
         //returnContentPackIDs(us.ContactId);
        iNeedContentPackUtility ic=new iNeedContentPackUtility();
        Set<Id> contentIdForLeftNavigation=ic.returnContentPackIDs(us.ContactId);
        system.debug('contentId in remote method'+contentIdForLeftNavigation);
        Picklist_Values_Available__c pickAvailObjTemp=[select id,Picklist_Value__c,Picklist_Value__r.Parent__c,Picklist_Value__r.Parent__r.Parent__c,iNeed_Content_Pack__c,Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where id=:pickAvailObjId and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation];
        system.debug('pickAvailObjTemp in remote method'+pickAvailObjTemp);  
        List<TravelDocumentWrapper> tempChildRecordWrapperList=new List<TravelDocumentWrapper>();

        List<Picklist_Values_Available__c> childPickRecordsList=[select Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where Picklist_Value__r.Parent__c=:pickAvailObjTemp.Picklist_Value__c and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation order by Picklist_Value__r.Order_Number__c] ;

            system.debug('childPickRecordsList'+childPickRecordsList);


            List<Id> childCountrecordIds=new List<Id>();


            for(Picklist_Values_Available__c tempChildPickForArticle:childPickRecordsList){

                childCountrecordIds.add(tempChildPickForArticle.Picklist_Value__c);
            }


             List<Picklist_Values_Available__c> childCountPicklistValues=new List<Picklist_Values_Available__c>();

             childCountPicklistValues=[select Picklist_Value__c,Picklist_Value__r.Parent__c,Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where Picklist_Value__r.Parent__c in:childCountrecordIds and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation order by Picklist_Value__c,Picklist_Value__r.Order_Number__c] ;








            for(Picklist_Values_Available__c childPickObj:childPickRecordsList){
                TravelDocumentWrapper tempchildPickObj=new TravelDocumentWrapper(childPickObj);
                tempchildPickObj.sfdcObject=childPickObj.Picklist_Value__r;




                 TravelDocumentWrapper countTempChild;
                 List<TravelDocumentWrapper> countTempChildList=new List<TravelDocumentWrapper>();
                for(Picklist_Values_Available__c tempChildCountPicList:childCountPicklistValues){
                       if(tempChildCountPicList.Picklist_Value__r.Parent__c==childPickObj.Picklist_Value__c ){


                           countTempChild=new TravelDocumentWrapper(tempChildCountPicList);
                           countTempChildList.add(countTempChild);
                           }
                }

                tempchildPickObj.travelDocWrapperList=countTempChildList;

                 tempChildRecordWrapperList.add(tempchildPickObj);
                }
             system.debug('tempChildRecordWrapperList in global '+tempChildRecordWrapperList);

             return tempChildRecordWrapperList;
    }


//Wrapper Class

global class TravelDocumentWrapper
{

   global TravelDocumentWrapper(Picklist_Values_Available__c pickObj)
      {
              docTitle=pickObj.Picklist_Value__r.Label__c;

              docArticle=new Information__kav();
              docLevel=pickObj.Picklist_Value__r.Navigation_Level__c;
              isCurrentActive=false;
              docRecordId=pickObj.id;
              parentRecId=pickObj.Picklist_Value__c;
              travelDocWrapperList=new List<TravelDocumentWrapper>();
              briefSummary='';
              sfdcObject=pickObj.Picklist_Value__r;
      }

      global Sobject sfdcObject{get;set;}  
      global String parentRecId{get;set;}
      global String docTitle{get;set;}

      global Information__kav docArticle{get;set;}
      global String docLevel{get;set;}
      global Boolean isCurrentActive{get;set;}

      global String docRecordId{get;set;}
      global List<TravelDocumentWrapper> travelDocWrapperList{get;set;}
      global String briefSummary{get;set;}





}

 
//Function in Visualforce Page

function getChildRecordsForLeftNavigation(recordId)
                {   var recordIdTemp=recordId;
                    
                    var wrapper = new Object();
                   
                    alert(recordId);
                   
                        
                    Visualforce.remoting.Manager.invokeAction(
                                                        '{!$RemoteAction.iNeed_MyTravelDetailsController.getChildRecordsForLeftNavigationDisplay}',
                                                           recordIdTemp, 
                                                        function(result, event)
                                                        {
                                                            if (event.status)
                                                            {
                                                                
                                                                console.log(result); 
                                                        
                                                            } else if (event.type === 'exception') 
                                                            {
                                                                
                                                                console.log(event.message); 
                                                            } else
                                                            {
                                                                
                                                                 console.log(event.message); 
                                                                  console.log(event.where); 
                                                            }
                                                        }, 
                                                        {escape: true}
                                                            );
                }
 
// Method Call in Visualforce Page In this temp is Wrapper class object


 <apex:outputpanel rendered="{!(temp.travelDocWrapperList.size!=0 || temp.sfdcObject['Article_Number__c']!='')}">
                                                                <apex:outputLink value="{!$Page.iNeed_MyTravelDetails}" rendered="{!Not(temp.docRecordId==$CurrentPage.parameters.SelectedHeader)}" onclick="javascript:getChildRecordsForLeftNavigation('{!temp.docRecordId}');"  >  {!temp.docTitle}
                                                                   <apex:param name="SelectedHeader" value="{!temp.docRecordId}"/> 
                                                               </apex:outputLink>
                                                                <apex:outputText value="{!temp.docTitle}" rendered="{!(temp.docRecordId==$CurrentPage.parameters.SelectedHeader)}"/>
                                                           </apex:outputpanel>
 
//Remote Method in Controller Class

@RemoteAction
    global static List<TravelDocumentWrapper> getChildRecordsForLeftNavigationDisplay(Id pickAvailObjId) {
        system.debug('inside remote method');
        system.debug('pickAvailObjId in global method'+pickAvailObjId);
        //system.debug('contentId in remote method'+iNeed_MyTravelDetailsController.contentId);
        
        User us=[Select ContactId from User Where Id=:UserInfo.getUserId()];
     
        System.debug('User Value in remote method' +us);
        System.debug('User Contact in remote method ' +us.ContactId);
         //returnContentPackIDs(us.ContactId);
        iNeedContentPackUtility ic=new iNeedContentPackUtility();
        Set<Id> contentIdForLeftNavigation=ic.returnContentPackIDs(us.ContactId);
        system.debug('contentId in remote method'+contentIdForLeftNavigation);
        Picklist_Values_Available__c pickAvailObjTemp=[select id,Picklist_Value__c,Picklist_Value__r.Parent__c,Picklist_Value__r.Parent__r.Parent__c,iNeed_Content_Pack__c,Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where id=:pickAvailObjId and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation];
        system.debug('pickAvailObjTemp in remote method'+pickAvailObjTemp);  
        List<TravelDocumentWrapper> tempChildRecordWrapperList=new List<TravelDocumentWrapper>();
        
        List<Picklist_Values_Available__c> childPickRecordsList=[select Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where Picklist_Value__r.Parent__c=:pickAvailObjTemp.Picklist_Value__c and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation order by Picklist_Value__r.Order_Number__c] ;
        
            system.debug('childPickRecordsList'+childPickRecordsList);
            
           
            List<Id> childCountrecordIds=new List<Id>();
            
            
            for(Picklist_Values_Available__c tempChildPickForArticle:childPickRecordsList){
               
                childCountrecordIds.add(tempChildPickForArticle.Picklist_Value__c);
            }
            
            
             List<Picklist_Values_Available__c> childCountPicklistValues=new List<Picklist_Values_Available__c>();
             
             childCountPicklistValues=[select Picklist_Value__c,Picklist_Value__r.Parent__c,Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where Picklist_Value__r.Parent__c in:childCountrecordIds and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation order by Picklist_Value__c,Picklist_Value__r.Order_Number__c] ;
            
           
           
       
       
       
            
        
            for(Picklist_Values_Available__c childPickObj:childPickRecordsList){
                TravelDocumentWrapper tempchildPickObj=new TravelDocumentWrapper(childPickObj);
                tempchildPickObj.sfdcObject=childPickObj.Picklist_Value__r;
                
              
                
                
                 TravelDocumentWrapper countTempChild;
                 List<TravelDocumentWrapper> countTempChildList=new List<TravelDocumentWrapper>();
                for(Picklist_Values_Available__c tempChildCountPicList:childCountPicklistValues){
                       if(tempChildCountPicList.Picklist_Value__r.Parent__c==childPickObj.Picklist_Value__c ){
                          
                       
                           countTempChild=new TravelDocumentWrapper(tempChildCountPicList);
                           countTempChildList.add(countTempChild);
                           }
                }
                
                tempchildPickObj.travelDocWrapperList=countTempChildList;
                   
                 tempChildRecordWrapperList.add(tempchildPickObj);
                }
             system.debug('tempChildRecordWrapperList in global '+tempChildRecordWrapperList);
             
             return tempChildRecordWrapperList;
    }
 
//Wrapper Class

global class TravelDocumentWrapper
{
     
   global TravelDocumentWrapper(Picklist_Values_Available__c pickObj)
      {
              docTitle=pickObj.Picklist_Value__r.Label__c;
            
              docArticle=new Information__kav();
              docLevel=pickObj.Picklist_Value__r.Navigation_Level__c;
              isCurrentActive=false;
              docRecordId=pickObj.id;
              parentRecId=pickObj.Picklist_Value__c;
              travelDocWrapperList=new List<TravelDocumentWrapper>();
              briefSummary='';
              sfdcObject=pickObj.Picklist_Value__r;
      }
      
      global Sobject sfdcObject{get;set;}  
      global String parentRecId{get;set;}
      global String docTitle{get;set;}
     
      global Information__kav docArticle{get;set;}
      global String docLevel{get;set;}
      global Boolean isCurrentActive{get;set;}
     
      global String docRecordId{get;set;}
      global List<TravelDocumentWrapper> travelDocWrapperList{get;set;}
      global String briefSummary{get;set;}
      
      
      
        

}

 
I am able to run a flow from a button  using System Admin profile But when I am running it from other profile I am getting Below Error. I have checked permission profile has access to Case object on which flow is triggered and opportunity which is being created.Any help would be appreciated.
An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.​
User-added imageUser-added image
I have one custom button on a page that is invoking one flow. I am able to run this flow using one profile but not able to do so using another profile. User-added image
Java Script Code:

{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/14.0/apex.js")}
{!REQUIRESCRIPT("/xdomain/xdomain.js")}
{!REQUIRESCRIPT("/support/console/30.0/integration.js")}

try{
var caseId='{!Case.Id}';
var isArleadyInProgress='No';
var prodNme="{!Case.Product}";
var contNme="{!Case.Contact}";
var projName="{!Case.ProjectName__c}";
var spend="{!Case.Project_value__c}";
var optyId="{!Case.Opportunity__c}";


var additnlParame='';
if(prodNme!=null && prodNme!='' && prodNme!='null')
{
prodNme=escape(prodNme);
additnlParame="&ProductName="+prodNme;
}

if(contNme!=null && contNme!='' && contNme!='null')
{
contNme=escape(contNme);
additnlParame=additnlParame+"&ContactName="+contNme;
}




if(
(prodNme!=null && prodNme!='' && prodNme!='null')&&
(contNme!=null && contNme!='' && contNme!='null') &&
(spend!=null && spend!='' && spend!='null') &&
(projName!=null && projName!='' && projName!='null')
)

{

var flowURL="./apex/BPCreateSavingHeader?cid="+caseId+'&retURL='+caseId;
if(additnlParame!='')
flowURL=flowURL+additnlParame;


if(optyId==null || optyId=='' || optyId=='null')
{
if (sforce.console.isInConsole()) {
srcUp(flowURL);
} else {
window.location.href=flowURL;
}
}
else
{
alert("Opportunity is already created");
}

}

else{ alert("Please enter Product,Contact,Project Name,Start Date and Spend"); }


}

catch(err) {
txt="There was an error occurred during opportunity creation \n\n";
txt+="Error description: " + err.description + "\n\n";
txt+="Click OK to continue.\n\n";
alert(txt);
}



User-added image

Create Saving Header is button


This is in voking one flow not working with one profile .


 
I need to use it in VF page.


    <apex:outputLink target="_blank" value="{!recordWrapperForContent.sfdcObject['Url__c']}">  <apex:outputField value="{!temp.sfdcObject['Navigation_Image__c']}"  style="height: 240px !important; width:100px !important;" ></apex:outputField></apex:outputLink>
                            
This code I am using Url__c field of type URL and Navigation IMAGE is image.  "recordWrapperForContent.sfdcObject" is wrapper class variable This is  So what I want is when I click on field of type rich text area(Image) it should move to the location as specified by other field of type URL.I am getting this error  when I click on Image


"
The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores."
I have created one workflow rule on a custom object to change record owner to queue.I have selected notify assignee checkbox while assigning record to queue. But I am not receiving any notification email.
User-added image

In queue, I have kept Queue Email and Send Email to members checkbox blank since I have read from post that if both of the fields are blank then all queue members will by default receive notification if record is assigned to queue.
User-added image
I have assigned myself as queue member. My email id is valid but I  have not received any notification when record owner is changed to queue.

Please help in this.
Record type selection screen is not coming if I am clicking on New button on related list. But it is coming if I am creating new record from available tab.

We have one sample request object and its child object(sample product). When I am clicking on new button(sample product) on related list of sample request, it is directly going to default record type and record type selection screen is not coming.
User-added image
But if I am directly creating sample product record from tab, record type selection screen is coming.
User-added image
Please help . I am not able to understand why record type selection option is not  available while creating records from related list.
 
I have created one workflow rule to populate one field(workflow field update)  if it is blank,but it is getting populated with WFR even if I am manually entering data in that field.
Workflow rule:
User-added image
Workflow Field Update:
User-added image
I am not able to understand I am entered criteria to check if Street field is null, then only it should trigger. Why it is overriding values that I have entered manually in street field with Workflow field update.
Please help. 
//Function in Visualforce Page

function getChildRecordsForLeftNavigation(recordId)
                {   var recordIdTemp=recordId;
                    
                    var wrapper = new Object();
                   
                    alert(recordId);
                   
                        
                    Visualforce.remoting.Manager.invokeAction(
                                                        '{!$RemoteAction.iNeed_MyTravelDetailsController.getChildRecordsForLeftNavigationDisplay}',
                                                           recordIdTemp, 
                                                        function(result, event)
                                                        {
                                                            if (event.status)
                                                            {
                                                                
                                                                console.log(result); 
                                                        
                                                            } else if (event.type === 'exception') 
                                                            {
                                                                
                                                                console.log(event.message); 
                                                            } else
                                                            {
                                                                
                                                                 console.log(event.message); 
                                                                  console.log(event.where); 
                                                            }
                                                        }, 
                                                        {escape: true}
                                                            );
                }
 
// Method Call in Visualforce Page In this temp is Wrapper class object


 <apex:outputpanel rendered="{!(temp.travelDocWrapperList.size!=0 || temp.sfdcObject['Article_Number__c']!='')}">
                                                                <apex:outputLink value="{!$Page.iNeed_MyTravelDetails}" rendered="{!Not(temp.docRecordId==$CurrentPage.parameters.SelectedHeader)}" onclick="javascript:getChildRecordsForLeftNavigation('{!temp.docRecordId}');"  >  {!temp.docTitle}
                                                                   <apex:param name="SelectedHeader" value="{!temp.docRecordId}"/> 
                                                               </apex:outputLink>
                                                                <apex:outputText value="{!temp.docTitle}" rendered="{!(temp.docRecordId==$CurrentPage.parameters.SelectedHeader)}"/>
                                                           </apex:outputpanel>
 
//Remote Method in Controller Class

@RemoteAction
    global static List<TravelDocumentWrapper> getChildRecordsForLeftNavigationDisplay(Id pickAvailObjId) {
        system.debug('inside remote method');
        system.debug('pickAvailObjId in global method'+pickAvailObjId);
        //system.debug('contentId in remote method'+iNeed_MyTravelDetailsController.contentId);
        
        User us=[Select ContactId from User Where Id=:UserInfo.getUserId()];
     
        System.debug('User Value in remote method' +us);
        System.debug('User Contact in remote method ' +us.ContactId);
         //returnContentPackIDs(us.ContactId);
        iNeedContentPackUtility ic=new iNeedContentPackUtility();
        Set<Id> contentIdForLeftNavigation=ic.returnContentPackIDs(us.ContactId);
        system.debug('contentId in remote method'+contentIdForLeftNavigation);
        Picklist_Values_Available__c pickAvailObjTemp=[select id,Picklist_Value__c,Picklist_Value__r.Parent__c,Picklist_Value__r.Parent__r.Parent__c,iNeed_Content_Pack__c,Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where id=:pickAvailObjId and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation];
        system.debug('pickAvailObjTemp in remote method'+pickAvailObjTemp);  
        List<TravelDocumentWrapper> tempChildRecordWrapperList=new List<TravelDocumentWrapper>();
        
        List<Picklist_Values_Available__c> childPickRecordsList=[select Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where Picklist_Value__r.Parent__c=:pickAvailObjTemp.Picklist_Value__c and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation order by Picklist_Value__r.Order_Number__c] ;
        
            system.debug('childPickRecordsList'+childPickRecordsList);
            
           
            List<Id> childCountrecordIds=new List<Id>();
            
            
            for(Picklist_Values_Available__c tempChildPickForArticle:childPickRecordsList){
               
                childCountrecordIds.add(tempChildPickForArticle.Picklist_Value__c);
            }
            
            
             List<Picklist_Values_Available__c> childCountPicklistValues=new List<Picklist_Values_Available__c>();
             
             childCountPicklistValues=[select Picklist_Value__c,Picklist_Value__r.Parent__c,Picklist_Value__r.Picklist_Type__c,Picklist_Value__r.Label__c,picklist_Value__r.Navigation_Level__c,Picklist_Value__r.Order_Number__c,Picklist_Value__r.Navigation_Image__c,Picklist_Value__r.Url__c,Picklist_Value__r.Description__c,Picklist_Value__r.Enlarged_Navigation_Image__c,Picklist_Value__r.Detailed_Description__c,iNeed_Content_Pack__r.Description__c,Picklist_Value__r.Article_Number__c from Picklist_Values_Available__c where Picklist_Value__r.Parent__c in:childCountrecordIds and Picklist_Value__r.Picklist_Type__c='Navigation' and iNeed_Content_Pack__c in:contentIdForLeftNavigation order by Picklist_Value__c,Picklist_Value__r.Order_Number__c] ;
            
           
           
       
       
       
            
        
            for(Picklist_Values_Available__c childPickObj:childPickRecordsList){
                TravelDocumentWrapper tempchildPickObj=new TravelDocumentWrapper(childPickObj);
                tempchildPickObj.sfdcObject=childPickObj.Picklist_Value__r;
                
              
                
                
                 TravelDocumentWrapper countTempChild;
                 List<TravelDocumentWrapper> countTempChildList=new List<TravelDocumentWrapper>();
                for(Picklist_Values_Available__c tempChildCountPicList:childCountPicklistValues){
                       if(tempChildCountPicList.Picklist_Value__r.Parent__c==childPickObj.Picklist_Value__c ){
                          
                       
                           countTempChild=new TravelDocumentWrapper(tempChildCountPicList);
                           countTempChildList.add(countTempChild);
                           }
                }
                
                tempchildPickObj.travelDocWrapperList=countTempChildList;
                   
                 tempChildRecordWrapperList.add(tempchildPickObj);
                }
             system.debug('tempChildRecordWrapperList in global '+tempChildRecordWrapperList);
             
             return tempChildRecordWrapperList;
    }
 
//Wrapper Class

global class TravelDocumentWrapper
{
     
   global TravelDocumentWrapper(Picklist_Values_Available__c pickObj)
      {
              docTitle=pickObj.Picklist_Value__r.Label__c;
            
              docArticle=new Information__kav();
              docLevel=pickObj.Picklist_Value__r.Navigation_Level__c;
              isCurrentActive=false;
              docRecordId=pickObj.id;
              parentRecId=pickObj.Picklist_Value__c;
              travelDocWrapperList=new List<TravelDocumentWrapper>();
              briefSummary='';
              sfdcObject=pickObj.Picklist_Value__r;
      }
      
      global Sobject sfdcObject{get;set;}  
      global String parentRecId{get;set;}
      global String docTitle{get;set;}
     
      global Information__kav docArticle{get;set;}
      global String docLevel{get;set;}
      global Boolean isCurrentActive{get;set;}
     
      global String docRecordId{get;set;}
      global List<TravelDocumentWrapper> travelDocWrapperList{get;set;}
      global String briefSummary{get;set;}
      
      
      
        

}