• pupilstuff
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 33
    Questions
  • 19
    Replies
Dear All,
I need one help from Architects/Developers regarding community SSO.I have a requirement where my customer should be logged it to the community directly 
I have a corporate website for customers and there is a link on that site which opens up the Salesforce customer community so if the customer is logged in the corporate website, he should not be asked to log in again in the community. 

How can we meet this requirement? Do we need to use Single SIgn on here?

Thanks
Mayank Jain

Hello ,   I have a something brainstorm requirement. I need a complete picture of my project as for e.g , how many profiles , buttons , record types and which button on which page layout , almost every information in simple manner. Because every time I do waste lot of time to get an information for e.g on which all page layout the button 'Lost deal ' is available I check my all 50 page layout ans thus waste my time. Can I somehow automate an process that when ever new thing added , it should update my excel sheet contain all the information   is anything available in salesforce or do I need to make a project on this , Please guide me

 

Hello ,

 

I have a something brainstorm requirement.

I need a complete picture of my project as for e.g , how many profiles , buttons , record types and which button on which page layout , almost every information in simple manner. Because every time I do waste lot of time to get an information for e.g on which all page layout the button 'Lost deal ' is available

I check my all 50 page layout ans thus waste my time.

Can I somehow automate an process that when ever new thing added , it should update my excel sheet contain all the information

 

is anything available in salesforce or do I need to make a project on this , Please guide me

 

 

 

Hello ,

 

My req is: When I click on the row the color of the row should change from yellow to any other.I am using java script for this.When I click on the row alert generates but color doesnt change .Please help

 

<apex:page controller="LogClassificationVFC">
<apex:sectionHeader title="Mapping of Error"/>
    <apex:form id="form1" >
        <apex:pageBlock id="pBlock" title="Mapping" mode="edit">
            <apex:panelGrid columns="2" id="panel">
                <apex:outputPanel id="op1" styleClass="requiredInput" layout="block">          
                    <apex:pageBlockSection >                  
                    <apex:outputlabel value="Catagory "/>
                    <apex:selectList value="{!rootErrorStr}"  multiselect="false" size="1">
                        <apex:selectOptions value="{!rootErrorList}" />
                            <apex:actionSupport action="{!showAllRecord}" event="onchange"  rerender="panel" status="status"/>
                        </apex:selectList><p/>
                                </apex:pageBlockSection>
                </apex:outputPanel>

                <apex:pageBlockTable rendered="{!addErrorFlag}" value="{!showRecList}" var="showRec">
                    <apex:column value="{!showRec}" />
                </apex:pageBlockTable>
 
                <apex:pageBlockTable id="pbTable" rendered="{!addErrorFlag}" value="{!showRecRelNewErrSet}" var="showAllRec" onrowClick="show('{!$Component.this}');">
                    <apex:column value="{!showAllRec}" style="background-color:yellow"/>  
                </apex:pageBlockTable>
                <script> var options = document.getElementById("{!$Component.pbTable}"); </script>
                <apex:pageBlockSection id="addError" rendered="{!addErrorFlag}" > 
                    <apex:outputLabel value="Select Error"/>
                    <apex:selectList value="{!addErrorStr}"  multiselect="false" size="1">
                        <apex:selectOptions value="{!rootErrorList}" />
                    </apex:selectList><p/>
                </apex:pageBlockSection>

            </apex:panelGrid>
         
            <apex:pageBlockButtons location="both">
               <apex:commandButton value="Add Error" action="{!addError}"/>
               <apex:commandButton value="Delete Error" action="{!deleteError}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
        <apex:pageMessages /> 
    </apex:form>
    <style>

    .selectedDataRow {
        background-color:#80BFFF;
    }


    </style>
    <script>
    
        function show(rowVar){ 
              alert('working');
               rowVar.className = "selectedDataRow";
          }

</script>

</apex:page>

Hello ,

 

My req is: When I click on the row the color of the row should change from yellow to any other.I am using java script for this.When I click on the row alert generates but color doesnt change .Please help

 

<apex:page controller="LogClassificationVFC">
<apex:sectionHeader title="Mapping of Error"/>
    <apex:form id="form1" >
        <apex:pageBlock id="pBlock" title="Mapping" mode="edit">
            <apex:panelGrid columns="2" id="panel">
                <apex:outputPanel id="op1" styleClass="requiredInput" layout="block">           
                    <apex:pageBlockSection >                   
                    <apex:outputlabel value="Catagory "/>
                    <apex:selectList value="{!rootErrorStr}"  multiselect="false" size="1">
                        <apex:selectOptions value="{!rootErrorList}" />
                            <apex:actionSupport action="{!showAllRecord}" event="onchange"  rerender="panel" status="status"/>
                        </apex:selectList><p/>
                                </apex:pageBlockSection>
                </apex:outputPanel>

                <apex:pageBlockTable rendered="{!addErrorFlag}" value="{!showRecList}" var="showRec">
                    <apex:column value="{!showRec}" />
                </apex:pageBlockTable>
 
                <apex:pageBlockTable id="pbTable" rendered="{!addErrorFlag}" value="{!showRecRelNewErrSet}" var="showAllRec" onrowClick="show('{!$Component.this}');">
                    <apex:column value="{!showAllRec}" style="background-color:yellow"/>   
                </apex:pageBlockTable>
                <script> var options = document.getElementById("{!$Component.pbTable}"); </script>
                <apex:pageBlockSection id="addError" rendered="{!addErrorFlag}" >  
                    <apex:outputLabel value="Select Error"/>
                    <apex:selectList value="{!addErrorStr}"  multiselect="false" size="1">
                        <apex:selectOptions value="{!rootErrorList}" />
                    </apex:selectList><p/>
                </apex:pageBlockSection>

            </apex:panelGrid>
          
            <apex:pageBlockButtons location="both">
               <apex:commandButton value="Add Error" action="{!addError}"/>
               <apex:commandButton value="Delete Error" action="{!deleteError}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
        <apex:pageMessages />  
    </apex:form>
    <style>

    .selectedDataRow {
        background-color:#80BFFF;
    }


    </style>
    <script>
     
        function show(rowVar){  
              alert('working');
               rowVar.className = "selectedDataRow";
          }

</script>

</apex:page>

Hello,

 

I am badly stuck in one requirement

 

1. in table I have 5 colum named edit(button) , native attribute , webservice attribute , save, cancel

 

2. save and cancel button are invisble at page load

 

2. when user click on edit on particular row the webserive attribute should be replace by picklist ,and save and cancel should be visible

 

Problem

 

when user click on edit for particular row..save , cancel and picklist are getting visible for every row.

 

I just wantto upadte single row not all one

 

VF page

 

 

<apex:page controller="DataMapperControllerTestMay" showHeader="True" sidebar="True">
    <apex:form id="theForm">
       <apex:pageBlock title="Data Mappings">
            <apex:pageBlockSection columns="1" >
                <apex:messages />
            </apex:pageBlockSection>

            <apex:pageBlockTable id="pbt" value="{!Mappings}" var="mapp">
  
                <apex:column headerValue="" >
                    <apex:outputPanel id="Edit" >
                        <apex:commandLink action="{!editActivity}" value="Edit"/>
                        <apex:param assignTo="{!saveFlag}" value="Edit"/>
     
                    </apex:outputPanel>
                </apex:column>
              
                <apex:column headerValue="Webservice Attributes" value="{!mapp.Source_Name__c}"/>
                <apex:column headerValue="Native Attributes">
                    <apex:outputText value="{!mapp.Source_Name__c}" rendered="{!(!saveFlag)}"/>
                  
                    <apex:outputPanel id="NativeAtt" rendered="{!saveFlag}">                  
                        <apex:pageBlock id="block2" >
                     
                            <apex:outputPanel Id="objList">
                                <apex:pageblocksection >
                                    <apex:selectList id="Test" value="{!selectedObjectStr}" size="1">
                                        <apex:selectOptions value="{!objectNamesList}"/>
                                        <apex:actionSupport event="onchange" rerender="objList,fieldList" action="{!initFieldNamesRef}"/>     
                                    </apex:selectList>
                                      
                                </apex:pageblocksection>     
                            </apex:outputPanel>
                          
                            <apex:outputPanel id="fieldList">
                                <apex:pageblocksection rendered="{!not(isnull(selectedObjectStr))}">
                                    <apex:selectList value="{!selectedFieldStr}" size="1">
                                        <apex:selectOptions value="{!fieldNamesList}"/>
                                    </apex:selectList>
                                </apex:pageblocksection>
                            </apex:outputPanel>
  
                        </apex:pageBlock>
                    </apex:outputPanel>                  

                </apex:column>
              
                <apex:column headerValue="" >
                    <apex:outputPanel id="save" rendered="{!saveFlag}"   >
                        <apex:commandLink action="{!saveActivity}" reRender="objList" value="Save"/>       
                    </apex:outputPanel>
                </apex:column>
              
              
                <apex:column headerValue="" >
                    <apex:outputPanel id="cancel" rendered="{!cancelFlag}" >
                        <apex:commandLink action="{!cancelActivity}" value="Cancel"/>       
                    </apex:outputPanel>
                </apex:column>
              
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

Controller

 

 

public class DataMapperControllerTestMay {
  
    public boolean saveFlag {get;set;}
    public boolean cancelFlag {get;set;}
  
    // Describe
    public Map  <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    public List <SelectOption> objectNamesList{public get; private set;}
    public String selectedObjectStr {get; set;}
  
    public List <SelectOption> fieldNamesList {get; set;}
    public String selectedFieldStr {get; set;}
  
    // Describe
  
    public PageReference cancelActivity() {
        return null;
    }


    public PageReference saveActivity() {
      
        String targetStr = selectedObjectStr +':'+ selectedFieldStr ;
        System.debug('@@targetStr '+targetStr);

        System.debug('@@GE_B2B_WSDL_Definition__c.getAll()'+GE_B2B_WSDL_Definition__c.getAll());
        B2BFieldMapperManager.addUpdate(Mappings[0].Source_Name__c ,targetStr);
        return null;
    }


    public PageReference editActivity() {
        saveFlag = true;
        cancelFlag = true;
        return null;
    }
      
    public DataMapperControllerTestMay(){
      
        //Describer
        objectNamesList = initObjNames();
        fieldNamesList = new List<SelectOption>();

        //Describer

       Mappings=loadMappings();
    }

    public List<GE_B2B_Field_Mapper__c> Mappings {get;set;}
    public List<GE_B2B_Field_Mapper__c> Vals;
           
    public List<GE_B2B_Field_Mapper__c> loadMappings() {
        Vals = [Select Source_Name__c, Target_Attribute__c, Target_Object__c from GE_B2B_Field_Mapper__c];
        return Vals;
    }
 
   // Describer
 
    private List<SelectOption> initObjNames() {
        List<SelectOption> objNamesList = new List<SelectOption>();
        List<String> entitiesList = new List<String>(schemaMap.keySet());
        entitiesList.sort();
        for(String nameStr : entitiesList)
            objNamesList.add(new SelectOption(nameStr,nameStr));
            return objNamesList;
    }
  
    public pageReference initFieldNamesRef(){
      initFieldNames();
      return null;
    }
  
    public List<SelectOption> initFieldNames() {
        Map <String, Schema.SObjectField> fieldMap = schemaMap.get(selectedObjectStr).getDescribe().fields.getMap();
        fieldNamesList.clear();
        for(String nameFieldStr : fieldMap.keyset()){
            fieldNamesList.add(new SelectOption(nameFieldStr ,nameFieldStr));
        }
            return fieldNamesList;
    }
  
   // Describer
 
}

 

 

Hello,

 

I am badly stuck in one requirement

 

1. in table I have 5 colum named edit(button) , native attribute , webservice attribute , save, cancel

 

2. save and cancel button are invisble at page load

 

2. when user click on edit on particular row the webserive attribute should be replace by picklist ,and save and cancel should be visible

 

Problem

 

when user click on edit for particular row..save , cancel and picklist are getting visible for every row.

 

I just wantto upadte single row not all one

 

VF page

 

 

<apex:page controller="DataMapperControllerTestMay" showHeader="True" sidebar="True">
    <apex:form id="theForm">
       <apex:pageBlock title="Data Mappings">
            <apex:pageBlockSection columns="1" >
                <apex:messages />
            </apex:pageBlockSection>

            <apex:pageBlockTable id="pbt" value="{!Mappings}" var="mapp">
  
                <apex:column headerValue="" >
                    <apex:outputPanel id="Edit" >
                        <apex:commandLink action="{!editActivity}" value="Edit"/>
                        <apex:param assignTo="{!saveFlag}" value="Edit"/>
     
                    </apex:outputPanel>
                </apex:column>
              
                <apex:column headerValue="Webservice Attributes" value="{!mapp.Source_Name__c}"/>
                <apex:column headerValue="Native Attributes">
                    <apex:outputText value="{!mapp.Source_Name__c}" rendered="{!(!saveFlag)}"/>
                  
                    <apex:outputPanel id="NativeAtt" rendered="{!saveFlag}">                  
                        <apex:pageBlock id="block2" >
                     
                            <apex:outputPanel Id="objList">
                                <apex:pageblocksection >
                                    <apex:selectList id="Test" value="{!selectedObjectStr}" size="1">
                                        <apex:selectOptions value="{!objectNamesList}"/>
                                        <apex:actionSupport event="onchange" rerender="objList,fieldList" action="{!initFieldNamesRef}"/>     
                                    </apex:selectList>
                                      
                                </apex:pageblocksection>     
                            </apex:outputPanel>
                          
                            <apex:outputPanel id="fieldList">
                                <apex:pageblocksection rendered="{!not(isnull(selectedObjectStr))}">
                                    <apex:selectList value="{!selectedFieldStr}" size="1">
                                        <apex:selectOptions value="{!fieldNamesList}"/>
                                    </apex:selectList>
                                </apex:pageblocksection>
                            </apex:outputPanel>
  
                        </apex:pageBlock>
                    </apex:outputPanel>                  

                </apex:column>
              
                <apex:column headerValue="" >
                    <apex:outputPanel id="save" rendered="{!saveFlag}"   >
                        <apex:commandLink action="{!saveActivity}" reRender="objList" value="Save"/>       
                    </apex:outputPanel>
                </apex:column>
              
              
                <apex:column headerValue="" >
                    <apex:outputPanel id="cancel" rendered="{!cancelFlag}" >
                        <apex:commandLink action="{!cancelActivity}" value="Cancel"/>       
                    </apex:outputPanel>
                </apex:column>
              
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

Controller

 

 

public class DataMapperControllerTestMay {
  
    public boolean saveFlag {get;set;}
    public boolean cancelFlag {get;set;}
  
    // Describe
    public Map  <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    public List <SelectOption> objectNamesList{public get; private set;}
    public String selectedObjectStr {get; set;}
  
    public List <SelectOption> fieldNamesList {get; set;}
    public String selectedFieldStr {get; set;}
  
    // Describe
  
    public PageReference cancelActivity() {
        return null;
    }


    public PageReference saveActivity() {
      
        String targetStr = selectedObjectStr +':'+ selectedFieldStr ;
        System.debug('@@targetStr '+targetStr);

        System.debug('@@GE_B2B_WSDL_Definition__c.getAll()'+GE_B2B_WSDL_Definition__c.getAll());
        B2BFieldMapperManager.addUpdate(Mappings[0].Source_Name__c ,targetStr);
        return null;
    }


    public PageReference editActivity() {
        saveFlag = true;
        cancelFlag = true;
        return null;
    }
      
    public DataMapperControllerTestMay(){
      
        //Describer
        objectNamesList = initObjNames();
        fieldNamesList = new List<SelectOption>();

        //Describer

       Mappings=loadMappings();
    }

    public List<GE_B2B_Field_Mapper__c> Mappings {get;set;}
    public List<GE_B2B_Field_Mapper__c> Vals;
           
    public List<GE_B2B_Field_Mapper__c> loadMappings() {
        Vals = [Select Source_Name__c, Target_Attribute__c, Target_Object__c from GE_B2B_Field_Mapper__c];
        return Vals;
    }
 
   // Describer
 
    private List<SelectOption> initObjNames() {
        List<SelectOption> objNamesList = new List<SelectOption>();
        List<String> entitiesList = new List<String>(schemaMap.keySet());
        entitiesList.sort();
        for(String nameStr : entitiesList)
            objNamesList.add(new SelectOption(nameStr,nameStr));
            return objNamesList;
    }
  
    public pageReference initFieldNamesRef(){
      initFieldNames();
      return null;
    }
  
    public List<SelectOption> initFieldNames() {
        Map <String, Schema.SObjectField> fieldMap = schemaMap.get(selectedObjectStr).getDescribe().fields.getMap();
        fieldNamesList.clear();
        for(String nameFieldStr : fieldMap.keyset()){
            fieldNamesList.add(new SelectOption(nameFieldStr ,nameFieldStr));
        }
            return fieldNamesList;
    }
  
   // Describer
 
}

 

 

public class DataMapperControllerTestMay {
   
    public boolean saveFlag {get;set;}
    public boolean cancelFlag {get;set;}
   
    // Describe
    public Map  <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    public List <SelectOption> objectNamesList{public get; private set;}
    public String selectedObjectStr {get; set;}
   
    public List <SelectOption> fieldNamesList {get; set;}
    public String selectedFieldStr {get; set;}
   
    // Describe
   
    public PageReference cancelActivity() {
        return null;
    }


    public PageReference saveActivity() {
       
        String targetStr = selectedObjectStr +':'+ selectedFieldStr ;
        System.debug('@@targetStr '+targetStr);

        System.debug('@@GE_B2B_WSDL_Definition__c.getAll()'+GE_B2B_WSDL_Definition__c.getAll());
        B2BFieldMapperManager.addUpdate(Mappings[0].Source_Name__c ,targetStr);
        return null;
    }


    public PageReference editActivity() {
        saveFlag = true;
        cancelFlag = true;
        return null;
    }
       
    public DataMapperControllerTestMay(){
       
        //Describer
        objectNamesList = initObjNames();
        fieldNamesList = new List<SelectOption>();

        //Describer

       Mappings=loadMappings();
    }

    public List<GE_B2B_Field_Mapper__c> Mappings {get;set;}
    public List<GE_B2B_Field_Mapper__c> Vals;
            
    public List<GE_B2B_Field_Mapper__c> loadMappings() {
        Vals = [Select Source_Name__c, Target_Attribute__c, Target_Object__c from GE_B2B_Field_Mapper__c];
        return Vals;
    }
  
   // Describer
  
    private List<SelectOption> initObjNames() {
        List<SelectOption> objNamesList = new List<SelectOption>();
        List<String> entitiesList = new List<String>(schemaMap.keySet());
        entitiesList.sort();
        for(String nameStr : entitiesList)
            objNamesList.add(new SelectOption(nameStr,nameStr));
            return objNamesList;
    }
   
    public pageReference initFieldNamesRef(){
      initFieldNames();
      return null;
    }
   
    public List<SelectOption> initFieldNames() {
        Map <String, Schema.SObjectField> fieldMap = schemaMap.get(selectedObjectStr).getDescribe().fields.getMap();
        fieldNamesList.clear();
        for(String nameFieldStr : fieldMap.keyset()){
            fieldNamesList.add(new SelectOption(nameFieldStr ,nameFieldStr));
        }
            return fieldNamesList;
    }
   
  
  
  
   // Describer
 
}

Hello,

 

I am badly stuck in one requirement

 

1. in table I have 5 colum named edit(button) , native attribute , webservice attribute , save, cancel

 

2. save and cancel button are invisble at page load

 

2. when user click on edit on particular row the webserive attribute should be replace by picklist ,and save and cancel should be visible

 

Problem

 

when user click on edit for particular row..save , cancel and picklist are getting visible for every row.

 

I just wantto upadte single row not all one

 

VF page

 

 

<apex:page controller="DataMapperControllerTestMay" showHeader="True" sidebar="True">
    <apex:form id="theForm">
       <apex:pageBlock title="Data Mappings">
            <apex:pageBlockSection columns="1" >
                <apex:messages />
            </apex:pageBlockSection>

            <apex:pageBlockTable id="pbt" value="{!Mappings}" var="mapp">
   
                <apex:column headerValue="" >
                    <apex:outputPanel id="Edit" >
                        <apex:commandLink action="{!editActivity}" value="Edit"/> 
                        <apex:param assignTo="{!saveFlag}" value="Edit"/>
      
                    </apex:outputPanel>
                </apex:column>
               
                <apex:column headerValue="Webservice Attributes" value="{!mapp.Source_Name__c}"/>
                <apex:column headerValue="Native Attributes">
                    <apex:outputText value="{!mapp.Source_Name__c}" rendered="{!(!saveFlag)}"/>
                   
                    <apex:outputPanel id="NativeAtt" rendered="{!saveFlag}">                   
                        <apex:pageBlock id="block2" >
                      
                            <apex:outputPanel Id="objList">
                                <apex:pageblocksection >
                                    <apex:selectList id="Test" value="{!selectedObjectStr}" size="1">
                                        <apex:selectOptions value="{!objectNamesList}"/>
                                        <apex:actionSupport event="onchange" rerender="objList,fieldList" action="{!initFieldNamesRef}"/>      
                                    </apex:selectList>
                                       
                                </apex:pageblocksection>      
                            </apex:outputPanel>
                           
                            <apex:outputPanel id="fieldList">
                                <apex:pageblocksection rendered="{!not(isnull(selectedObjectStr))}">
                                    <apex:selectList value="{!selectedFieldStr}" size="1">
                                        <apex:selectOptions value="{!fieldNamesList}"/>
                                    </apex:selectList>
                                </apex:pageblocksection>
                            </apex:outputPanel>
   
                        </apex:pageBlock>
                    </apex:outputPanel>                   

                </apex:column>
               
                <apex:column headerValue="" >
                    <apex:outputPanel id="save" rendered="{!saveFlag}"   >
                        <apex:commandLink action="{!saveActivity}" reRender="objList" value="Save"/>        
                    </apex:outputPanel>
                </apex:column>
               
               
                <apex:column headerValue="" >
                    <apex:outputPanel id="cancel" rendered="{!cancelFlag}" >
                        <apex:commandLink action="{!cancelActivity}" value="Cancel"/>        
                    </apex:outputPanel>
                </apex:column>
               
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

Controller

 

 

public class DataMapperControllerTestMay {
   
    public boolean saveFlag {get;set;}
    public boolean cancelFlag {get;set;}
   
    // Describe
    public Map  <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    public List <SelectOption> objectNamesList{public get; private set;}
    public String selectedObjectStr {get; set;}
   
    public List <SelectOption> fieldNamesList {get; set;}
    public String selectedFieldStr {get; set;}
   
    // Describe
   
    public PageReference cancelActivity() {
        return null;
    }


    public PageReference saveActivity() {
       
        String targetStr = selectedObjectStr +':'+ selectedFieldStr ;
        System.debug('@@targetStr '+targetStr);

        System.debug('@@GE_B2B_WSDL_Definition__c.getAll()'+GE_B2B_WSDL_Definition__c.getAll());
        B2BFieldMapperManager.addUpdate(Mappings[0].Source_Name__c ,targetStr);
        return null;
    }


    public PageReference editActivity() {
        saveFlag = true;
        cancelFlag = true;
        return null;
    }
       
    public DataMapperControllerTestMay(){
       
        //Describer
        objectNamesList = initObjNames();
        fieldNamesList = new List<SelectOption>();

        //Describer

       Mappings=loadMappings();
    }

    public List<GE_B2B_Field_Mapper__c> Mappings {get;set;}
    public List<GE_B2B_Field_Mapper__c> Vals;
            
    public List<GE_B2B_Field_Mapper__c> loadMappings() {
        Vals = [Select Source_Name__c, Target_Attribute__c, Target_Object__c from GE_B2B_Field_Mapper__c];
        return Vals;
    }
  
   // Describer
  
    private List<SelectOption> initObjNames() {
        List<SelectOption> objNamesList = new List<SelectOption>();
        List<String> entitiesList = new List<String>(schemaMap.keySet());
        entitiesList.sort();
        for(String nameStr : entitiesList)
            objNamesList.add(new SelectOption(nameStr,nameStr));
            return objNamesList;
    }
   
    public pageReference initFieldNamesRef(){
      initFieldNames();
      return null;
    }
   
    public List<SelectOption> initFieldNames() {
        Map <String, Schema.SObjectField> fieldMap = schemaMap.get(selectedObjectStr).getDescribe().fields.getMap();
        fieldNamesList.clear();
        for(String nameFieldStr : fieldMap.keyset()){
            fieldNamesList.add(new SelectOption(nameFieldStr ,nameFieldStr));
        }
            return fieldNamesList;
    }
   
   // Describer
 
}

 

 

Hello,

 

Can I make the Case status field read only for every user . If not then any workaround for this ?

 

 

Thanks

Mayank Jain

Hello,

 

Can I make the Case status field read only for every user . If not then any workaround for this ?

 

 

Thanks

Mayank Jain

Hello,

 

Can I make the Case status field read only for every user . If not then any workaround for this ?

 

 

Thanks

Mayank Jain

Hello ,

 

I have a apex controller in which have a url for exmple

String url = '/500/e?nooverride=1&ent=Case&RecordType=' + recordTypeIdList[0].id

 

In which I just to pass a value of field for example 'Order Name' which is custom field in Case layout.

How Can I do it

But I dont want to use the field ID of the Order Name as it wont work in other enviorment .

 

Thanks

Mayank Jain

Hello ,

 

I have a apex controller in which have a url for exmple

String url = '/500/e?nooverride=1&ent=Case&RecordType=' + recordTypeIdList[0].id

 

In which I just to pass a value of field for example 'Order Name' which is custom field in Case layout.

How Can I do it

But I dont want to use the field ID of the Order Name as it wont work in other enviorment .

 

Thanks

Mayank Jain

Hello I am just trying to write a test class for the portal users

 

  profileName=[select IsPortalEnabled,Profile.Name from User]; 
                 if(profileName[0].IsPortalEnabled==true){

  // some code
                        }       

               else{

// some code

             }

 

my test code is.................................................................................

 

        enum PortalType { CSPLiteUser, PowerPartner, PowerCustomerSuccess, CustomerSuccess }
        
        static testmethod void usertest() {
            User pu = getPortalUser(PortalType.PowerCustomerSuccess, null, true);
            System.assert([select isPortalEnabled
                             from user
                            where id = :pu.id].isPortalEnabled,
                          'User was not flagged as portal enabled.');     
            
            System.RunAs(pu) {
                System.assert([select isPortalEnabled
                                 from user
                                where id = :UserInfo.getUserId()].isPortalEnabled,
                              'User wasnt portal enabled within the runas block. ');
            }
        }
        
        public static User getPortalUser(PortalType portalType, User userWithRole, Boolean doInsert) {
        
            /* Make sure the running user has a role otherwise an exception
               will be thrown. */
            if(userWithRole == null) { 
                
                if(UserInfo.getUserRoleId() == null) {
    
                    UserRole r = new UserRole(name = 'TEST ROLE');
                    Database.insert(r);
                    
                    userWithRole = new User(alias = 'hasrole', email='userwithrole@roletest1.com', userroleid = r.id,
                                        emailencodingkey='UTF-8', lastname='Testing', languagelocalekey='en_US',
                                        localesidkey='en_US', profileid = UserInfo.getProfileId(),
                                        timezonesidkey='America/Los_Angeles', username='userwithrole@testorg.com');
                } else {
                    userWithRole = new User(Id = UserInfo.getUserId(), UserRoleId = UserInfo.getUserRoleId());
                }
                
                System.assert(userWithRole.userRoleId != null,
                              'This test requires the target org to have at least one UserRole created. Please create a user role in this organization and try again.');
            }
    
            Account a;
            Contact c;
            System.runAs(userWithRole) {
    
                a = new Account(name = 'TEST ACCOUNT');
                Database.insert(a);
                
                c = new Contact(AccountId = a.id, lastname = 'lastname');
                Database.insert(c);
 
       
        mainSSID= new Sold_Service__c(
            CRM_Account__c=a.id,
           
            SSID__c='22224',
            Name='Test_mayank_IPA',
            CRM_Product_Category__c='VPN & Ethernet',
            CRM_Product_Name__c='Ethernet over SDH'
        );
            insert mainSSID;
       
        mainCase = new Case(
            Parent_Account__c=a.id,
            SSID__c=mainSSID.id,
            accountId = a.id,
            contactId = c.id,
            Type='Incident',
            OPC__c='2222'
        );
            insert mainCase;


            }
            
            /* Get any profile for the given type.*/
            Profile p = [select id
                          from profile
                         where usertype = :portalType.name()
                         limit 1]; 
            
            String testemail = 'puser000@amamama.com';
            User pu = new User(profileId = p.id, username = testemail, email = testemail,
                               emailencodingkey = 'UTF-8', localesidkey = 'en_US',
                               languagelocalekey = 'en_US', timezonesidkey = 'America/Los_Angeles',
                               alias='cspu', lastname='lastname', contactId = c.id);
          
          
          
          
          
            
            if(doInsert) {
                Database.insert(pu);
            }
            return pu;
        }
  
        private static testmethod void incidentSsidPortalTest(){
        Test.startTest();
        usertest();
        controller = new TT_Case_NewButtonVFC_Ext(new ApexPages.StandardController(mainCase));
        PageReference pr = controller.goToCaseEditPage();
        Test.stopTest();
    }
  

 

But still its checking only else loop..means profile is not getting enabled for postal user

 

 

Plz help for this

 

 

 

Hello I am just trying to write a test class for the portal users

 

  profileName=[select IsPortalEnabled,Profile.Name from User]; 
                 if(profileName[0].IsPortalEnabled==true){

  // some code
                        }       

               else{

// some code

             }

 

my test code is.................................................................................

 

        enum PortalType { CSPLiteUser, PowerPartner, PowerCustomerSuccess, CustomerSuccess }
        
        static testmethod void usertest() {
            User pu = getPortalUser(PortalType.PowerCustomerSuccess, null, true);
            System.assert([select isPortalEnabled
                             from user
                            where id = :pu.id].isPortalEnabled,
                          'User was not flagged as portal enabled.');     
            
            System.RunAs(pu) {
                System.assert([select isPortalEnabled
                                 from user
                                where id = :UserInfo.getUserId()].isPortalEnabled,
                              'User wasnt portal enabled within the runas block. ');
            }
        }
        
        public static User getPortalUser(PortalType portalType, User userWithRole, Boolean doInsert) {
        
            /* Make sure the running user has a role otherwise an exception
               will be thrown. */
            if(userWithRole == null) { 
                
                if(UserInfo.getUserRoleId() == null) {
    
                    UserRole r = new UserRole(name = 'TEST ROLE');
                    Database.insert(r);
                    
                    userWithRole = new User(alias = 'hasrole', email='userwithrole@roletest1.com', userroleid = r.id,
                                        emailencodingkey='UTF-8', lastname='Testing', languagelocalekey='en_US',
                                        localesidkey='en_US', profileid = UserInfo.getProfileId(),
                                        timezonesidkey='America/Los_Angeles', username='userwithrole@testorg.com');
                } else {
                    userWithRole = new User(Id = UserInfo.getUserId(), UserRoleId = UserInfo.getUserRoleId());
                }
                
                System.assert(userWithRole.userRoleId != null,
                              'This test requires the target org to have at least one UserRole created. Please create a user role in this organization and try again.');
            }
    
            Account a;
            Contact c;
            System.runAs(userWithRole) {
    
                a = new Account(name = 'TEST ACCOUNT');
                Database.insert(a);
                
                c = new Contact(AccountId = a.id, lastname = 'lastname');
                Database.insert(c);
 
       
        mainSSID= new Sold_Service__c(
            CRM_Account__c=a.id,
           
            SSID__c='22224',
            Name='Test_mayank_IPA',
            CRM_Product_Category__c='VPN & Ethernet',
            CRM_Product_Name__c='Ethernet over SDH'
        );
            insert mainSSID;
       
        mainCase = new Case(
            Parent_Account__c=a.id,
            SSID__c=mainSSID.id,
            accountId = a.id,
            contactId = c.id,
            Type='Incident',
            OPC__c='2222'
        );
            insert mainCase;


            }
            
            /* Get any profile for the given type.*/
            Profile p = [select id
                          from profile
                         where usertype = :portalType.name()
                         limit 1]; 
            
            String testemail = 'puser000@amamama.com';
            User pu = new User(profileId = p.id, username = testemail, email = testemail,
                               emailencodingkey = 'UTF-8', localesidkey = 'en_US',
                               languagelocalekey = 'en_US', timezonesidkey = 'America/Los_Angeles',
                               alias='cspu', lastname='lastname', contactId = c.id);
          
          
          
          
          
            
            if(doInsert) {
                Database.insert(pu);
            }
            return pu;
        }
  
        private static testmethod void incidentSsidPortalTest(){
        Test.startTest();
        usertest();
        controller = new TT_Case_NewButtonVFC_Ext(new ApexPages.StandardController(mainCase));
        PageReference pr = controller.goToCaseEditPage();
        Test.stopTest();
    }
  

 

But still its checking only else loop..means profile is not getting enabled for postal user

 

 

Plz help for this

Hello I am just trying to write a test class for the portal users

 

  profileName=[select IsPortalEnabled,Profile.Name from User]; 
                 if(profileName[0].IsPortalEnabled==true){

  // some code
                        }       

               else{

// some code

             }

 

my test code is.................................................................................

 

 

/*enum PortalType { CSPLiteUser, PowerPartner, PowerCustomerSuccess, CustomerSuccess }
   
    static testmethod void usertest() {
        User pu = getPortalUser(PortalType.PowerCustomerSuccess, null, true);
        System.assert([select isPortalEnabled
                         from user
                        where id = :pu.id].isPortalEnabled,
                      'User was not flagged as portal enabled.');      
       
        System.RunAs(pu) {
            System.assert([select isPortalEnabled
                             from user
                            where id = :UserInfo.getUserId()].isPortalEnabled,
                          'User wasnt portal enabled within the runas block. ');
        }
    }
   
    public static User getPortalUser(PortalType portalType, User userWithRole, Boolean doInsert) {
   
        /* Make sure the running user has a role otherwise an exception
           will be thrown. */
    /*    if(userWithRole == null) {  
           
            if(UserInfo.getUserRoleId() == null) {

                UserRole r = new UserRole(name = 'TEST ROLE');
                Database.insert(r);
               
                userWithRole = new User(alias = 'hasrole', email='userwithrole@roletest1.com', userroleid = r.id,
                                    emailencodingkey='UTF-8', lastname='Testing', languagelocalekey='en_US',
                                    localesidkey='en_US', profileid = UserInfo.getProfileId(),
                                    timezonesidkey='America/Los_Angeles', username='userwithrole@testorg.com');
            } else {
                userWithRole = new User(Id = UserInfo.getUserId(), UserRoleId = UserInfo.getUserRoleId());
            }
           
            System.assert(userWithRole.userRoleId != null,
                          'This test requires the target org to have at least one UserRole created. Please create a user role in this organization and try again.');
        }

        Account a;
        Contact c;
        System.runAs(userWithRole) {

                  userWithRole.IsPortalEnabled = true;
                  update userWithRole;
            a = new Account(name = 'TEST ACCOUNT');
            Database.insert(a);
             a.IsPartner = true;
             update a;
            
            c = new Contact(AccountId = a.id, lastname = 'lastname');
            Database.insert(c);
           
       
            mainSSID= new Sold_Service__c(
            CRM_Account__c=a.id,
            SSID__c='22224',
            Name='Test_mayank_IPA',
            CRM_Product_Category__c='VPN & Ethernet',
            CRM_Product_Name__c='Ethernet over SDH'
            );
            insert mainSSID;
       
            mainCase = new Case(
            SSID__c=mainSSID.id,
            accountId = a.id,
            contactId = c.id,
            Parent_Account__c=a.id,
            Type='Incident',
            OPC__c='2222'
            );
            insert mainCase;
          
 
        }
       
        /* Get any profile for the given type.*/
    /*    Profile p = [select id
                      from profile
                     where usertype =:portalType.name()
                     limit 1];  
       
        String testemail = 'puser000@amamama.com';
        User pu = new User(profileId = p.id, username = testemail, email = testemail,
                           emailencodingkey = 'UTF-8', localesidkey = 'en_US',
                           languagelocalekey = 'en_US', timezonesidkey = 'America/Los_Angeles',
                           alias='cspu', lastname='lastname', contactId = c.id);
       
        if(doInsert) {
            Database.insert(pu);
        }
          return pu;
    }

private static testmethod void incidentSsidPortalTest(){
        Test.startTest();
        usertest();
        controller = new TT_Case_NewButtonVFC_Ext(new ApexPages.StandardController(mainCase));
        PageReference pr = controller.goToCaseEditPage();
        Test.stopTest();
    }

 

 

 

But still its checking only else loop..means profile is not getting enabled for postal user

 

 

Plz help for this

 

 

 

 

Hi ,

 

By mistake I wrote code for devbox which not going to work at the time of deployment

 

Please let me know how to change this code , so It can work out in QA and production

 

url='/500/e?cas5=Incident&ent=Case&nooverride=1&&retURL=%2F500%2Fo&RecordType='+results[0].Id+'&CF00NW0000000Fgdg='+result12[0].Name+'&cas4='+result13[0].Name+'&00NW0000000FsWb='+results[0].name;

Hi ,

 

By mistake I wrote code for devbox which not going to work at the time of deployment

 

Please let me know how to change this code , so It can work out in QA and production

 

url='/500/e?cas5=Incident&ent=Case&nooverride=1&&retURL=%2F500%2Fo&RecordType='+results[0].Id+'&CF00NW0000000Fgdg='+result12[0].Name+'&cas4='+result13[0].Name+'&00NW0000000FsWb='+results[0].name;

Hi ,

 

By mistake I wrote code for devbox which not going to work at the time of deployment

 

Please let me know how to change this code , so It can work out in QA and production

 

url='/500/e?cas5=Incident&ent=Case&nooverride=1&&retURL=%2F500%2Fo&RecordType='+results[0].Id+'&CF00NW0000000Fgdg='+result12[0].Name+'&cas4='+result13[0].Name+'&00NW0000000FsWb='+results[0].name;

Hi,

I have created Facebook as authentication provider and the authentication works and take the user to standard login page.

i would like to take the customer portal to force.com site page.

i am referring this help page to add parameters in the URL but when i did and try to call the SSO URL it give me a error as Bad_id

https://help.salesforce.com/apex/HTViewHelpDoc?id=sso_provider_addl_params_site.htm&language=en_US#sso_provider_addl_params_site.xml

the error message i get is below

https://cs8.salesforce.com/_nc_external/identity/sso/ui/AuthorizationError?ErrorCode=Bad_Id

Hello ,   I have a something brainstorm requirement. I need a complete picture of my project as for e.g , how many profiles , buttons , record types and which button on which page layout , almost every information in simple manner. Because every time I do waste lot of time to get an information for e.g on which all page layout the button 'Lost deal ' is available I check my all 50 page layout ans thus waste my time. Can I somehow automate an process that when ever new thing added , it should update my excel sheet contain all the information   is anything available in salesforce or do I need to make a project on this , Please guide me

 

Hello ,

 

I have a something brainstorm requirement.

I need a complete picture of my project as for e.g , how many profiles , buttons , record types and which button on which page layout , almost every information in simple manner. Because every time I do waste lot of time to get an information for e.g on which all page layout the button 'Lost deal ' is available

I check my all 50 page layout ans thus waste my time.

Can I somehow automate an process that when ever new thing added , it should update my excel sheet contain all the information

 

is anything available in salesforce or do I need to make a project on this , Please guide me

 

 

 

Hi ,

 

By mistake I wrote code for devbox which not going to work at the time of deployment

 

Please let me know how to change this code , so It can work out in QA and production

 

url='/500/e?cas5=Incident&ent=Case&nooverride=1&&retURL=%2F500%2Fo&RecordType='+results[0].Id+'&CF00NW0000000Fgdg='+result12[0].Name+'&cas4='+result13[0].Name+'&00NW0000000FsWb='+results[0].name;

Hi ,

 

By mistake I wrote code for devbox which not going to work at the time of deployment

 

Please let me know how to change this code , so It can work out in QA and production

 

url='/500/e?cas5=Incident&ent=Case&nooverride=1&&retURL=%2F500%2Fo&RecordType='+results[0].Id+'&CF00NW0000000Fgdg='+result12[0].Name+'&cas4='+result13[0].Name+'&00NW0000000FsWb='+results[0].name;

Hello ,

 

I am trying to use a url in list button on the basis of some condition .But its showing error 'URL can not be found'.

I thnk need to decode the URL , but dont knw how to do it .Please help

 

this is what I am doing

 

{!IF(C_Job__c.mid__c = "ap","/00U/e?what_id=a0PU00000004oBV&retURL=%2Fa0PU00000004oBV" , "https://www.google.com")}

Hello ,

 

I am frequently getting this error please look at this .I am passing BId=013 to apex class.

 

VF Page

 

<apex:page showHeader="false" standardController="travel_status__c" extensions="travel_Emp_info">
<html><br></br><br></br>
<head> <b><big><center> <font face="Times New Roman" size="+3" color="#ff0000">Capgemini Travel Desk</font></center></big></b></head>
<br></br><br></br>
<apex:form id="f1">


 <apex:pageBlock id="block" >
   <apex:pageBlockSection title="Login" id="pageblock" >
     <apex:outputtext id="corp" value="Corp ID"/>
     <apex:outputtext value="Name"/>
     <apex:outputtext value="Project Name"/>
     <apex:outputtext value="Manager"/>
   <apex:pageBlockSection >
   <apex:inputText id="BId1" value="{!BId}"/>
  
      <apex:commandButton value="Submit" action="doSearch()"/>
     </apex:pageBlockSection>

    
     <apex:pageBlockTable value="{!result}" var="l" rendered="{!NOT(ISNULL(result))}">
        
              <apex:column value="{!l.Booking_ID__c}"/>
                <apex:column value="{!l.Emp_ID__c}"/>
                <apex:column value="{!l.Name__c}"/>
                 <apex:column value="{!l.Status__c}"/>
                <apex:column value="{!l.Remark__c}"/>
         
            
           </apex:pageBlockTable>
    
    

    <apex:commandButton value="Create New Requet" />
   </apex:pageBlockSection>  
 </apex:pageBlock> 
</apex:form>
</html>
</apex:page>

 

 

Apex class

 

public class travel_Emp_info
  {
     List<travel_status__c> result;
     public integer BId;
     public final travel_status__c o;
     public  travel_Emp_info(ApexPages.StandardController ctlr)
     {
     this.o=(travel_status__c)ctlr.getRecord();
 
     }

      public List<travel_status__c> getResult() {
      return result;
       }
    public void setBId(integer s)
    {
    BId=s;

    System.debug('the value is '+BId);
    }
    public integer getBId()
    {
     return BId;
    }

    public PageReference doSearch(){
    System.debug('the value inside'+BId);
    result=[Select Booking_ID__c,Remark__c,Status__c,Name__c,Emp_ID__c from travel_status__c where Booking_ID__c=:BId];
    return null;
   }
}

 

I have done that lot of times before ..but don't know why I am getting this error.

Hello,

 

I just want to show or hide the output panel "flight" on chaging the value of drop dwon box .

 

my code is

 

<apex:page showHeader="false" standardController="travel_booking__c" extensions="travel">
<html><br></br><br></br>
<head> <b><big><center> <font face="Times New Roman" size="+3" color="#ff0000">Capgemini Travel Desk</font></center></big></b></head>
<br></br><br></br>
<apex:form id="f1" rendered="true">
 <apex:pageBlock id="block" >
  <apex:pageBlockSection title="Login" id="pageblock" >

     <apex:outputtext value="Corp ID"/>
   
     <apex:outputtext value="Name"/>
   
   <apex:outputtext value="Project Name"/>
   
     <apex:outputtext value="Manager"/>
  
      <apex:inputField id="piclist" value="{!travel_booking__c.Travel_type__c}"  onchange="changevalue(document.getElementById('{!$Component.piclist}'));" />
  <br></br>
  <apex:outputText value="*This site is powered by Megha Travel agency"/>
  <br></br>
 
  <apex:outputPanel id="flight" rendered="false">
  <apex:outputText value="From Country" />
     <apex:inputField value="{!travel_booking__c.Fromcountry__c}"/>
      <apex:outputText value="To Country" />
     <apex:inputField value="{!travel_booking__c.To_Country__c}"/>
    </apex:outputPanel>
   
<apex:outputPanel layout="block" id="train" rendered="false"> 
<apex:outputText id="test" value="From City" />
     <apex:inputField value="{!travel_booking__c.From_City__c}"/>
      <apex:outputText value="To City" />
     <apex:inputField value="{!travel_booking__c.To_City__c}"/>
    </apex:outputPanel>
 
 
  </apex:pageBlockSection>

  <script type="text/javascript">
       
        function changevalue(txt)
        {
    
             if(txt.value=="Flight     (International)")
             {
                   
                 document.getElementById('{!$Component.block.pageblock.flight}').innerHTML.style.visibility ='visible';

             }
                           
        }  
</script>


 </apex:pageBlock>
 
 
</apex:form>
</html>
</apex:page>

 

Moreover plz tell me how to implement this with actionfunction

Hello,

 

I just want to show and hide the output panel on changes the value of dropdown box

 

 

<apex:page showHeader="false" standardController="travel_booking__c" extensions="travel">
<html><br></br><br></br>
<head> <b><big><center> <font face="Times New Roman" size="+3" color="#ff0000">Capgemini Travel Desk</font></center></big></b></head>
<br></br><br></br>
<apex:form id="f1" rendered="true">
 <apex:pageBlock >
  <apex:pageBlockSection title="Login" >

     <apex:outputtext value="Corp ID"/>
   
     <apex:outputtext value="Name"/>
   
   <apex:outputtext value="Project Name"/>
   
     <apex:outputtext value="Manager"/>
  
      <apex:inputField id="piclist" value="{!travel_booking__c.Travel_type__c}"  onchange="changevalue(document.getElementById('{!$Component.piclist}'));" />
  <br></br>
  <apex:outputText value="*This site is powered by Megha Travel agency"/>
  <br></br>
 
  <apex:outputPanel id="flight" rendered="false">
  <apex:outputText value="From Country" />
     <apex:inputField value="{!travel_booking__c.Fromcountry__c}"/>
      <apex:outputText value="To Country" />
     <apex:inputField value="{!travel_booking__c.To_Country__c}"/>
    </apex:outputPanel>
   
<apex:outputPanel layout="block" id="train" rendered="false"> 
<apex:outputText value="From City" />
     <apex:inputField value="{!travel_booking__c.From_City__c}"/>
      <apex:outputText value="To City" />
     <apex:inputField value="{!travel_booking__c.To_City__c}"/>
    </apex:outputPanel>
 
 
  </apex:pageBlockSection>

  <script type="text/javascript">
       
        function changevalue(txt)
        {
           
             if(txt.value=="Flight     (International)")
              //alert(document.getElementById("flight"));
             alert(txt.value);
             if(txt.value == 'Flight')
             {
                 document.getElementById('{!$Component.flight}').style.visibility = 'visible'; 

             }
                           
        }  
</script>


 </apex:pageBlock>
 
 
</apex:form>
</html>
</apex:page>

 

but this is not working .Moreover plz tell me how to do the same with the help of action  function .

Thanks

Hello Plz resolve this error

 

This is my apex code

 

<apex:page standardController="lib_demo__c" extensions="InventoryDetails1" showHeader="false">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >

<apex:inputField id="Acession_no__c" value="{!lib_demo__c.Acession_no__c}" />

        <apex:commandButton value="Seacrh" action="{!doSearch}"  rerender="block" status="status"/>
       
           <apex:pageBlockTable value="{!results}" var="l" rendered="{!NOT(ISNULL(results))}">
              <apex:column value="{!l.BookTitile__c}"/>
            
           </apex:pageBlockTable>
           

        
            
</apex:pageBlockSection>
</apex:pageBlock>

</apex:form>
</apex:page>

 

 

 

and this is myExtension

 

public class InventoryDetails1 {


public InventoryDetails1(ApexPages.StandardController controller) {}
   String searchText;
   List<lib_demo__c> results;

   public String getSearchText() {
      return searchText;
   }

   public void setSearchText(String s) {
      searchText = s;
   }

   public List<lib_demo__c> getResults() {
      return results;
   }

   public PageReference doSearch() {
  
   results = (List<lib_demo__c>)[FIND :searchText  RETURNING lib_demo__c(BookTitile__c)][0];
  
  
    //  results = (List<lib_demo__c>)[FIND :searchText RETURNING lib_demo__c(lib_demo__c.BookTitile__c)][0];
      return null;
   }

}

is there a way to convert a list of sobjects into a string?  I don't really care about the format, just that the field values can be string searched. Something like this:

 

 

List<sobject> pparcels = database.query('select ...');
String relatedMatches = pparcels.toString(); //toString doesn't exist
if (relatedMatches.indexOf(affectedIds[i]) > -1) {
...
}

 

 

  • June 22, 2010
  • Like
  • 0

When I tried to add a flex component in VF page and tried to execute, i got the following error

no viable alternative at character '"' can any one help me to find out what is the cause?

 

Thanks

Nithya

Message Edited by nithya on 01-24-2010 11:18 PM
  • January 25, 2010
  • Like
  • 0
We have several RecordTypes for our Contacts.  For our "Study Contact" page layout, all the appropriate detail fields are there, and we have a related list that shows Contacts that the current Contact has referred to us.  I want to hide the default New button on this related list and replace it with a "New Referral" button.  Clicking the "New Referral" button should invoke the New action, but set the RecordType to "Study Contact" behind the scenes and bypass the "Select Contact Record Type" page.
 
I have looked everywhere for examples, and managed to put together the following... but it still shows the "Select Contact Record Type" page.   I am putting the RecordType parameter in the parameter array and also including it directly on the URL just in case....  Help?
 
Code:
//First construct the new URL
var newUrl = "{!URLFOR( $Action.Contact.NewContact, null,
[RecordType=Contact.RecordType,
CF00N70000002GKJz_lkid=Contact.Id,
con4_lkid=Account.Id,
retURL=$Request.retURL], true)}&RecordType={!Contact.RecordType}";
//Then redirect the user to it
window.parent.location.replace(newUrl);

This is run in an Execute Javascript button.
I have tried putting the RecordTypeId value in there directly too (rather than use Contact.RecordType), but to no avail.
I'm also trying to automatically link the new Contact with the referrer Contact, and trying to pre-populate the Account ID.
 
Thank you for your help,
Jeff