• salesforcesss_deveoper211
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 6
    Replies
Can we mark "Units of Capacity" in routing configurations as 0 while configuring omni channel and is there any impact of that on the overall performance of the omni channel engine.
Hi,

Can someone pls help me to derive a method to parse this linkedin education response. I want to store this data into custom sfdc object. Thanks.

{"educations": {
  "_total": 2,
  "values": [
    {
      "activities": "Debate team",
      "degree": "Bachelor of Commerce (B.Com.)",
      "endDate": {"year": 2014},
      "fieldOfStudy": "",
      "id": 219318342,
      "schoolName": "The University of Texas at Austin",
      "startDate": {"year": 2010}
    },
    {
      "endDate": {"year": 2007},
      "id": 219316871,
      "schoolName": "University of California, Los Angeles",
      "startDate": {"year": 2005}
    }
  ]
}}


The method which I developed only captures one set of education data and igonres other, so just wanted to confirm my method. Also how can I parse startDate and endDate into date field of sfdc.

public void parseEduJSON(String JSONEduStr){
        if (JSONEduStr != null){
        linkedInEducation = new List<Education__c>();   
        JSONParser parser = JSON.createParser(JSONEduStr);
      
        while (parser.nextToken() != null)
        {
            if (parser.getCurrentToken() == JSONToken.START_OBJECT)
            {
               while (parser.nextToken() !=  JSONToken.END_OBJECT)
                {
               
                    if (parser.getCurrentToken() == JSONToken.START_ARRAY)
                    {
                        Education__c ei = new Education__c();
                        while (parser.nextToken() !=  JSONToken.END_ARRAY)
                        {
                              if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'activities'))
                                {
                                    parser.nextToken() ;    
                                    ei.Activities__c = parser.getText();
                                }
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'degree'))
                                {
                                    parser.nextToken()     ;
                                    ei.Degree__c = parser.getText();
                                }
                                /*if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'endDate'))
                                {
                                    parser.nextToken()     ;
                                    ei.End_Date__c = parser.getDateValue();
                                }  */
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'fieldOfStudy'))
                                {
                                    parser.nextToken()     ;
                                    ei.Field_of_Study__c = parser.getText();
                                }
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'id'))
                                {
                                    parser.nextToken()     ;
                                    ei.LinkedIn_Educations_ID__c = parser.getText();
                                }
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'schoolName'))
                                {
                                    parser.nextToken()     ;
                                    ei.Name = parser.getText();
                                }
                                /*if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'startDate'))
                                {
                                    parser.nextToken()     ;
                                    ei.Start_Date__c = parser.getDateValue();
                                }*/
                              
                        }
                        linkedInEducation.add(ei);
                        system.debug('>>>>>>>>>>>>>>>>final education'+linkedInEducation+'<<<<<<<<<<');
                      
                    }
                }
            }
        }
      
          if(linkedInEducation.size()>0 || linkedInEducation.isEmpty() == False){
           upsert linkedInEducation LinkedIn_Educations_ID__c;
          }
      }   
    }
Hi,

Can someone pls help me to derive a method to parse this linkedin education response. I want to store this data into custom sfdc object. Thanks.

{"educations": {
  "_total": 2,
  "values": [
    {
      "activities": "Debate team",
      "degree": "Bachelor of Commerce (B.Com.)",
      "endDate": {"year": 2014},
      "fieldOfStudy": "",
      "id": 219318342,
      "schoolName": "The University of Texas at Austin",
      "startDate": {"year": 2010}
    },
    {
      "endDate": {"year": 2007},
      "id": 219316871,
      "schoolName": "University of California, Los Angeles",
      "startDate": {"year": 2005}
    }
  ]
}}


The method which I developed only captures one set of education data and igonres other, so just wanted to confirm my method. Also how can I parse startDate and endDate into date field of sfdc.

public void parseEduJSON(String JSONEduStr){ 
        if (JSONEduStr != null){ 
        linkedInEducation = new List<Education__c>();    
        JSONParser parser = JSON.createParser(JSONEduStr);
       
        while (parser.nextToken() != null) 
        { 
            if (parser.getCurrentToken() == JSONToken.START_OBJECT) 
            { 
               while (parser.nextToken() !=  JSONToken.END_OBJECT) 
                { 
                
                    if (parser.getCurrentToken() == JSONToken.START_ARRAY) 
                    { 
                        Education__c ei = new Education__c(); 
                        while (parser.nextToken() !=  JSONToken.END_ARRAY) 
                        { 
                              if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'activities')) 
                                { 
                                    parser.nextToken() ;     
                                    ei.Activities__c = parser.getText(); 
                                } 
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'degree')) 
                                { 
                                    parser.nextToken()     ; 
                                    ei.Degree__c = parser.getText(); 
                                } 
                                /*if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'endDate')) 
                                { 
                                    parser.nextToken()     ; 
                                    ei.End_Date__c = parser.getDateValue(); 
                                }  */
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'fieldOfStudy')) 
                                { 
                                    parser.nextToken()     ; 
                                    ei.Field_of_Study__c = parser.getText(); 
                                }
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'id')) 
                                { 
                                    parser.nextToken()     ; 
                                    ei.LinkedIn_Educations_ID__c = parser.getText(); 
                                }
                                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'schoolName')) 
                                { 
                                    parser.nextToken()     ; 
                                    ei.Name = parser.getText(); 
                                }
                                /*if((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&(parser.getText() == 'startDate')) 
                                { 
                                    parser.nextToken()     ; 
                                    ei.Start_Date__c = parser.getDateValue(); 
                                }*/
                               
                        }
                        linkedInEducation.add(ei);
                        system.debug('>>>>>>>>>>>>>>>>final education'+linkedInEducation+'<<<<<<<<<<');
                       
                    } 
                } 
            } 
        }
       
          if(linkedInEducation.size()>0 || linkedInEducation.isEmpty() == False){
           upsert linkedInEducation LinkedIn_Educations_ID__c;
          }
      }    
    }

Hi

 

I want to create table which has column headers spanning over 2 rows & 3columns please find attached sample table.

 

Please let me me know how can I do it with apex:datatable & apex:column.

 

Thanks.

 


 

Hi,

 

I am setting "printurl" attribute of apex:sectionHeader tag which is set to a visualforce page and this VF page is renderAs "html". What I am looking for is, can I put page number on this VF page whichis renderAs html, in community I can find code to embed page number for pdf rendered VF pages but how can I embed page numbers for html render VF page.

 

Thanks.

Hi,

I have created a metrics using html table & apex:inputfield, here I set required attribute to true for field, but as I am adjusting the size of the inputfield the mandatory red mark appears on border of the table instaed of on field. Here is the code snipet,

<tr>
        <td style="background-color: #1797C0; font-weight: bold; color:#FFFFFF; vertical-align:middle; padding-left: 8px" width="12%">ABC</td>
<td style="vertical-align:middle; text-align:center; width:10%;">
<apex:inputField value="{!ABC__c.Col1__c}" rendered="{!Not(column12ReadOnly)}" required="True" label="" style="width:50%;"/>
<apex:outputField value="{!ABC__c.Col2__c}" rendered="{!column12ReadOnly}" label="" style="width:50%;"/>
</td></tr>\

Also attached below how the field looks like in table. So how can i get the red mark near field.

Hi,

 

I am using html table to create matrics, but on header row when I set required=ture for inputfield the line break gets added.

 

Please find below code snipet. I am not able to upload screenshot but the header cell has 2 rows instead of 1. So how can I put both inputfield & text in one line. Thanks!

 

<Table border="1" STYLE="border: 1px solid gray; border-collapse: collapse; border-spacing: 10pt 5pt" class="AItable" id="AITable">

<tr>
<th STYLE="background-color: #DDECF3; text-align:center;">Col1</th>
<th STYLE="background-color: #DDECF3; text-align:center; width:12%;">Col2</th>
<th STYLE="background-color: #DDECF3; text-align:center; vertical-align:middle;">YTD:&nbsp;
<apex:inputField value="{!CustomObj.Date1__c}" required="True" label="" style="width:40%;"/>
</th>
</Table>





Hi,

 

Can we get $Profile.Name = "System Administrator" in apex trigger.

 

If no then how can I check if the current user is system admin or not.

 

Thaks.

Hi

 

I want to create table which has column headers spanning over 2 rows & 3columns please find attached sample table.

 

Please let me me know how can I do it with apex:datatable & apex:column.

 

Thanks.

 


 

Hi,

I have created a metrics using html table & apex:inputfield, here I set required attribute to true for field, but as I am adjusting the size of the inputfield the mandatory red mark appears on border of the table instaed of on field. Here is the code snipet,

<tr>
        <td style="background-color: #1797C0; font-weight: bold; color:#FFFFFF; vertical-align:middle; padding-left: 8px" width="12%">ABC</td>
<td style="vertical-align:middle; text-align:center; width:10%;">
<apex:inputField value="{!ABC__c.Col1__c}" rendered="{!Not(column12ReadOnly)}" required="True" label="" style="width:50%;"/>
<apex:outputField value="{!ABC__c.Col2__c}" rendered="{!column12ReadOnly}" label="" style="width:50%;"/>
</td></tr>\

Also attached below how the field looks like in table. So how can i get the red mark near field.

Hi,

 

I am using html table to create matrics, but on header row when I set required=ture for inputfield the line break gets added.

 

Please find below code snipet. I am not able to upload screenshot but the header cell has 2 rows instead of 1. So how can I put both inputfield & text in one line. Thanks!

 

<Table border="1" STYLE="border: 1px solid gray; border-collapse: collapse; border-spacing: 10pt 5pt" class="AItable" id="AITable">

<tr>
<th STYLE="background-color: #DDECF3; text-align:center;">Col1</th>
<th STYLE="background-color: #DDECF3; text-align:center; width:12%;">Col2</th>
<th STYLE="background-color: #DDECF3; text-align:center; vertical-align:middle;">YTD:&nbsp;
<apex:inputField value="{!CustomObj.Date1__c}" required="True" label="" style="width:40%;"/>
</th>
</Table>





In my opportunity object.When the stage is changed.I need different approval process.I want to add different button for different approval process.I think I can write the Apex for calling the approval process.But how to use the default approval dialog?

 

Thanks 

  • December 02, 2011
  • Like
  • 0

Hi,

I need to display rows of a Salesforce object for data entry (eg product line items).

Each object has numerous fields (more than 20), and there are only a few rows (eg 5).

 

It would be much more practical my objects as columns in a VisualForce datatable, but that will be very complicated

- 1 or several transient classes to transform the Salesforce model into the displayed model

- 1 custom component for each different "complex" Salesforce type (date, lookup, selection list, etc.), since the VF page will no longer be displaying sObjects

- etc.

 

Is there a quicker way to benefit from all the standard Salesforce and VisualForce stuff (eg InputField instead of Inputtext) in a view where standard rows are transposed into columns ?

 

Thanks for any intelligent design ideas,

Rup