• Srini Nandhi
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 10
    Questions
  • 12
    Replies

Hi All,

I have a vf page with standard and Extension Controller. I want to Convert this page in to VF Component for Use in Emial Template.

i can able to get all the Extension functionality by putting component in VF page. but it is not working in VF Email Template.
How can i pass StandardController to Component controrller? and how to use Standard controller.getRecord() method in Constructor ?

tried with passing attribute name but not working.
 
can give me some exmple to pass Standard Controller Record to Component controller.

How to use and get StandardController.getRecord() in Components?

Thanks,

Srini

HI ALl,

I have a requirement with Salesforce with Amazon server with S3 Integration. I need to upload the files and same time download the files or URL of file form Amazon to  Salesforce.

I have uploaded the file using PUT method. Response i m receiving is like only [Status=OK and Statuscode=200] successful
but i m not getting any other things like uploadid or URL of the file.

i need URL of the File uploaded in Salesforce. Help me out from this

Thanks,

Reddy

Hi All,

I m new to Integration. I wanted to send the more than 100 fields to External Systyem by Use Rest API Post Method iN SALESFORCE. Can you please Suggest me or give some examples on this.

 

Thanks in advance
 

Hi All, 

getting this error "record id cannot be empty key", while inserting a Case using VF.

I Have a created a VF page with StandardSetController means RecordSetVar="true". Standard Controller ="Case"
I have used in StandardSetController in Extensions Controller.
  cas=(Case)controller.getRecord();
 cas.RecordTypeID=rtID;
        cas.OwnerID=UserInfo.getUserID();    
      
and i have overrieded Save Method and below 

public PageReference Save()
    {
   
        try{
      // Case c=new Case();
       c1=cas;
            insert c1;
            return New PageReference('/'+cas.id);
        }
        catch(Exception e){
            ApexPages.addMessages(e);
        }
        return null;
    }

while inserting a Case i am getting "record id cannot be empty key",  error
In the ViewState, i found Case id is having 00000000000 

Can anyone know about this, help me out.

Thanks 


 



how can i get selected file name (forcecom_workbook.pdf) as attachment file name. Please find below image to get file name in textbox. and need to get the size in MBs instedad of bytes.
User-added image
Hello All,

I have 2 PickList Fields. Type[aa,bb,cc] and Category(a,b,c,d)
Below is the Dependency.
aa-a
bb-a,b,c
cc-b,c,d

In VisualForce page i have used  <apex:inputField> for both fields.
for Category i have a Actionsupport to render the another Pageblocksections for each value in category different PBs

Here my Problem is

if i select Type='aa' automatically Category comes as 'a'(because it has only one dependent value). So for this Category 'a' related PageBlock section is not rendering.(only one dependent value not adding --None--)
for other categories its coming and  perfectly because --None-- is adding if we have more dependent values.

Can you please help me with this.

 
Can any one give the examples for Integration(using RestAPI and SOapAPI)

I want to understand Integrations in Salesforce. 
Hi

I have opened a subtab from Detail page custombutton. it is opening in another subtab, after saving the VF page. First subtab is not refreshing , so i want to close this first subtab(detail)(where i clicked button). 
after saving the tab i am able to see two same tabs, one is refreshed one. and another is not Rerfreshed(First tab)

any Help on this.

Thanks
Srini
How to Remove --None-- from Picklist values which is on VisualForce Page?

Removing --None-- from the Picklist Values.
Hi,

i have an issue with Refreshing page after performing Cancel and Save on Case Details page in the Console.
after performing the Standard Save and Cancel from VF is knowledgebar and Highlights panel is not getting dispaly. but if i refresh the page i am getting all the bars.
I tried with Integration Toolkit methods but its not working.

when i click one Custombutton it should open a VF in subtab with predifined name and display. i used stanadard Cancel & Save. when i click Save or cancel (on VF)  it should redirect to Case Details.(CaseFeed Layout) it should display with knowledgebar, higlights panel 

please Help me out
Thanks in Advance.
 
Hi all,

I am using following code to genrate sign, It is working fine in summer 16 salesforce release but my org it autmatically upgraded to winter 17 and this code starts giving follwoing exception:-

"EXCEPTION: System.SecurityException: Invalid Crypto Key
STACKTRACE: Class.System.Crypto.sign: line 35, column 1
AnonymousBlock: line 7, column 1
AnonymousBlock: line 7, column 1
LINE: 35 COLUMN: 1"


can any one help me on this???
string modifiedPrivateKey = 'MIIEpAIBAAKCAQEA1l9J+lUhM3RIADiLy2ajqUjltBqSVMthUlNnu8GsN4z85aniBIDebY+RkFhKDDW9hu8xM/Q4NEI7klmCVWI5BnobWfUjRbhd9oW94qBP7B1Ka6BsSn3RbfvGZZLcDNXd6806acpgMn79fjYPUQPI1kSfrd1GeMDQDGtNFsnCTd9zq2Vye4RQJrlDzC7g70i3jEHCh853ifD4MaQwo+SWf/eF7bLqA+81qUB2llRyA7SH9YF1I/ZmgH57MVTXb62HRMr/JxERDOerHLt7CK9hdbmM3vpRZz8MJnIMrNJKXXbxS69F8aLK7q+8i8xkl1IRwWVD9uJJaWpz7NEBs9EenwIDAQABAoIBACRDLjJoYBtiGiPfbNZVYG3sZN7Yd9RcKvRQI4YBNu6WrNj0qcT1P6rs1ETEipISLSM8JuiQ8Uj1wzn4ZjGnUdokoafP7c2HaG2hJgPF9n8MXWBjXK4lJl4ibucTtqF9M/MFXlIy557jGGJXJrQfncORDCnO+nLGuuq+4+Vs769YQ+bfj69pzfo4kUKaZRj6tgDcAo9Owbe6b7t1gGIM1fo+1fnyZrgYUxwor6periyvjefJaw8N78ASXbu9zHvVrbqaZmwXRJqCRRm8yYigGwQoxLX1DEryrSSCOEZWNUYzG+Det8XuvmsfRkYfw9p/Bz5XO5V70eU5zq5sw6qGkuECgYEA7feem7nGKMFyEVD9st8jhRvOD3n+Z5QAsbaCN5u3GkvXyKXeD7c0RYP4EPtVjEFcB+jy0zktl4Eks+iz7HhGvQhykQx5s5JC5k6P0Rsd+7YOU/8YsuSOvlXnnuclCzpoX1iClYVTJVQ9U7axbE3P07blQ3PqBu1pZ2XPC/sstRkCgYEA5p3xo4/gHQy65qpmh6EHtW2WlQDxbhLBCok8lCEioZaGK9PyNesGsuTcPLU4bj+mch3Yggn7aHfL/zXjdt4K5KWM6wVyK7KNgDisoJzA7fC4u+3VptLjeWKi+xVhPHLmnmuQP3Dq6SDCF2xbuIvynW0jiujdw6NQWYLo+NT+cHcCgYEAvocbvqMnPUplAehOuABgeBqjCVErl9KwG5l8+Pj7yVogEs561Sph96aJ307cV8ec39hrUyLclgkYUdNm+1XxjThOQkQyzMu2NJ+CFnIXt4k0P5xnMhQ9FbfCE0AOMMc6+dvr8bslryWbVINZ2tUSKPiu5yrPnWxIkDi7ZWRdj0ECgYASqR8fZAn3b8tD1O/884vDI332yp++j2ftaVNsjQ3XU23B6CGGOWFOYnRruSI60Y2vWDjntNUSC/eGzB5+xNLO05KGhedKH+WRRYS6blSyLDNWiZUrLY9YiCG1/XHjyUxd70g5yfJIMO1jpdH6KeDU2jrxB4zCQtnClHQzhlCcWwKBgQDGF4JypvYibSkfoiGHQR0Lq3U4l69t5KRcpBYuWdugPdBcdLUOlYOf+6ZPoH+gpk0Awlu+ZqgWfxPTa7eHLxIwCb2Y81bfrCISiUlUUJnPcE7bNrSnoskTQb8flqtGYT94eux0MKktRg6Wojrug/p7kvr7K1zA+zrfjvUK4Rc5LA0K';
string jwtClaims = 'eyJpc3MiOiJ5bnFpNTYzc3hzMDh4ZWR6ajM2a29lenduczZ1ZmRyMCIsInN1YiI6IjI4NTc5Mzg5NCIsImJveF9zdWJfdHlwZSI6InVzZXIiLCJhdWQiOiJodHRwczovL2FwaS5ib3guY29tL29hdXRoMi90b2tlbiIsImp0aSI6InRKVFRwUklmRFhFUlNkNjFBS0hIam9wUm41ZEVSMjBMIiwiZXhwIjoxNDc2MDg4ODA4fQ';
string jwtHeader = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InAwbXE4aHZqIn0';
String algorithmName = 'RSA-SHA256';
Blob input = Blob.valueOf(jwtHeader + '.' + jwtClaims);
Blob privateKeyBlob = EncodingUtil.base64Decode(modifiedPrivateKey);
Blob signed = Crypto.sign(algorithmName, input, privateKeyBlob);
Thanks Anurag
 

Hi All,

I have a vf page with standard and Extension Controller. I want to Convert this page in to VF Component for Use in Emial Template.

i can able to get all the Extension functionality by putting component in VF page. but it is not working in VF Email Template.
How can i pass StandardController to Component controrller? and how to use Standard controller.getRecord() method in Constructor ?

tried with passing attribute name but not working.
 
can give me some exmple to pass Standard Controller Record to Component controller.

How to use and get StandardController.getRecord() in Components?

Thanks,

Srini

HI ALl,

I have a requirement with Salesforce with Amazon server with S3 Integration. I need to upload the files and same time download the files or URL of file form Amazon to  Salesforce.

I have uploaded the file using PUT method. Response i m receiving is like only [Status=OK and Statuscode=200] successful
but i m not getting any other things like uploadid or URL of the file.

i need URL of the File uploaded in Salesforce. Help me out from this

Thanks,

Reddy

Hai all I have two Fields Start date and End Date if Start Date and End date lies Between Total status Should be updated to Active
How to Do it?
Thanks In Advance
Hi Experts,
 
In our salesforce application, we are using below objects.

Objects and Fields

Below are case records.

Case Records

Perfect – If project having single case record, Total_Recurred_Hours__c showing correct value like 110 (i.e. 40+20+50).
Wrong – If project having two or more than two records, Total_Recurred_Hours__c showing wrong value like 160 (i.e. previous case record 110 value + 20 + 30). But it should be showing 20+30= 50 for second case record.

Below are my case record images

Case Record_1 for Rest Projet:

Case Record_1

Case Record_2 for Rest Projet:

Case Record_2

Anyone sort out my issue, Thanks in advance.
 
Thanks,
Manu
How to Remove --None-- from Picklist values which is on VisualForce Page?

Removing --None-- from the Picklist Values.
Hi, 

 I created a javascript validation on page it is firiring only for the first field and it is not firing for second field please suggest me what is the mistake in the code written
 
<apex:page controller="DRNewControllers" showHeader="false" sidebar="false" action="{!save}">


    <script>
        function setRequired() {
            if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.CustPageBlockSectiontitle.customername}').value == '')
                alert("Enter Customer Name");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.projectname}').value == '')
                alert("Enter Project Name"); 
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.address1}').value == '')
                alert("Enter Address 1");               
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.city}').value == '')
                alert("Enter City");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.state}').value == '')
                alert("Enter State");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.zip}').value == '')
                alert("Enter Zip");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.country}').value == '')
                alert("Enter Country");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.company}').value == '')
                alert("Enter Company");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.CustPageBlockSection.industry}').value == '')
                alert("Enter Industry");         
                             
            else if (document.getElementById('{!$Component.theForm.thePageBlock.EndCustPageBlockSection.FirstName}').value == '')
                alert("Enter First Name");     
            else if (document.getElementById('{!$Component.theForm.thePageBlock.EndCustPageBlockSection.LastName}').value == '')
                alert("Enter Last Name"); 
            else if (document.getElementById('{!$Component.theForm.thePageBlock.EndCustPageBlockSection.Email}').value == '')
                alert("Enter Email ID"); 
            else if (document.getElementById('{!$Component.theForm.thePageBlock.EndCustPageBlockSection.Phone}').value == '')
                alert("Enter Phone");   

            else if (document.getElementById('{!$Component.theForm.thePageBlock.DealPageBlockSection.EstimatedClosedate}').value == '')
                alert("Enter Estimated Close Date");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.DealPageBlockSection.ProjectOverview}').value == '')
                alert("Enter Project Overview");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.DealPageBlockSection.Competitor}').value == '')
                alert("Enter Competitor");
            else if (document.getElementById('{!$Component.theForm.thePageBlock.DealPageBlockSection.ManageAPNET}').value == '')
                alert("Select Manage AP Networks");             

        }
    </script>  

         <apex:form id="theForm">
         <apex:pageBlock title="New Cloud Deal Registration Form" id="thePageBlock">
         
<apex:pageBlockButtons location="top">
      <apex:commandButton value="Submit Deal" action="{!Submit}" onclick="setRequired();"/>
      <apex:commandButton value="Cancel" immediate="false" action="{!Cancel}"/>
  </apex:pageBlockButtons>
  <apex:pageBlockButtons location="bottom">
      <apex:commandButton value="Submit Deal" action="{!Submit}"/>
      <apex:commandButton value="Cancel" immediate="false" action="{!Cancel}"/>
  </apex:pageBlockButtons>
  
   <apex:pageBlockSection title="End Customer Information" id="CustPageBlockSection">
    
   <apex:pageBlockSectionItem id="customernametitle">   
   <apex:outputLabel value="Customer Name" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" />
                    <apex:inputField value="{!newmember.Customer_Name__c}" required="false" id="customername"/>    </apex:outputPanel>
   </apex:pageBlockSectionItem>
       
   <apex:pageBlockSectionItem id="projectnametitle">    
   <apex:outputLabel value="Project Name" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" />  
         <apex:inputField value="{!newmember.Project_Name__c}" required="false" id="projectname"/>    </apex:outputPanel>       
   </apex:pageBlockSectionItem>    
       
   <apex:pageBlockSectionItem id="address1title">    
   <apex:outputLabel value="Address Line 1" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" /> 
        <apex:inputField value="{!newmember.Address_Line1__c}" required="false" id="address1"/>   </apex:outputPanel>
   </apex:pageBlockSectionItem>      
       
   <apex:inputField value="{!newmember.Address_Line2__c}" required="false" id="address2"/> 
   
   <apex:pageBlockSectionItem id="citytitle">    
   <apex:outputLabel value="City" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" />    
        <apex:inputField value="{!newmember.City__c}" required="false" id="city"/> </apex:outputPanel>
    </apex:pageBlockSectionItem>       
       
    <apex:pageBlockSectionItem id="statetitle">    
   <apex:outputLabel value="State" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" />
        <apex:inputField value="{!newmember.State__c}" required="false" id="state"/> </apex:outputPanel>
    </apex:pageBlockSectionItem>     
       
   <apex:pageBlockSectionItem id="ziptitle">    
   <apex:outputLabel value="Zip" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" /> 
        <apex:inputField value="{!newmember.Zip_Postal_Code__c}" required="false" id="zip"/> </apex:outputPanel> 
   </apex:pageBlockSectionItem>     
       
   <apex:pageBlockSectionItem id="countrytitle">    
   <apex:outputLabel value="Zip" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" /> 
        <apex:inputField value="{!newmember.Country__c}"   required="false" id="country"/>  </apex:outputPanel>
   </apex:pageBlockSectionItem>      
       
    <apex:pageBlockSectionItem id="companytitle">    
   <apex:outputLabel value="Company URL" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" /> 
        <apex:inputField value="{!newmember.Company_Url__c}"   required="false" id="company"/>  </apex:outputPanel>
    </apex:pageBlockSectionItem>     
       
       <apex:pageBlockSectionItem id="industrytitle">    
   <apex:outputLabel value="Industry" />
   <apex:outputPanel layout="block" styleClass="requiredInput">
   <apex:outputPanel layout="block" styleClass="requiredBlock" />   
      <apex:inputField value="{!newmember.Industry__c}"   required="false" id="industry"/>  </apex:outputPanel> 
    </apex:pageBlockSectionItem>          
            
   </apex:pageBlockSection>
   
   <apex:pageBlockSection id="mainSection" title="Product & Service Selection"> 

                  <apex:actionRegion >                         
                     <apex:selectList value="{!selectedValue}" multiselect="false" size="1" id="Prodselection">    
                          
                       <apex:selectOptions value="{!someList}"/> 
                       <apex:actionSupport event="onchange" action="{!updateData}" />
                     </apex:selectList>
                  </apex:actionRegion>
</apex:pageBlockSection>

              <apex:pageBlockSection id="section1" rendered="{!section1}">
               <apex:pageBlockSectionItem id="resaleproduct">    
                         <apex:outputLabel value="Product" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />
               <apex:inputField value="{!newmember.Cloud_Product__c}" required="false"/>
                </apex:outputPanel> 
    </apex:pageBlockSectionItem>          
    
     <apex:pageBlockSectionItem id="serviceterm">    
                         <apex:outputLabel value="Service Term" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />    
               <apex:inputField value="{!newmember.Cloud_Service_Term__c}" required="false"/> 
                </apex:outputPanel> 
    </apex:pageBlockSectionItem>  
     
          <apex:pageBlockSectionItem id="quantity">    
                         <apex:outputLabel value="Quantity" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" /> 
               <apex:inputField value="{!newmember.Product_Quantity__c}" required="false"/> 
                </apex:outputPanel> 
    </apex:pageBlockSectionItem>
      
                <apex:pageBlockSectionItem id="distributor">    
                         <apex:outputLabel value="Who is Your Meru Authorized Distributor?" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" /> 
               <apex:inputField value="{!newmember.Distributor__c}" required="false"/>  
               </apex:outputPanel> 
    </apex:pageBlockSectionItem>
      
       <apex:pageBlockSectionItem id="k12customer">    
                         <apex:outputLabel value="K-12 Customer" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />
               <apex:inputField value="{!newmember.K_12__c}" required="false"/>
                </apex:outputPanel> 
    </apex:pageBlockSectionItem>                 
              </apex:pageBlockSection>

             <apex:pageBlockSection id="section2" rendered="{!section2}">
             <apex:pageBlockSectionItem id="subscriptionterm">    
                         <apex:outputLabel value="Cloud Subscription Term" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />
             <apex:inputField value="{!newmember.Cloud_Subscription_Term__c}" required="false"/>  
             </apex:outputPanel> 
    </apex:pageBlockSectionItem>
    
    <apex:pageBlockSectionItem id="subscriptionQuantity">    
                         <apex:outputLabel value="Quantity" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />
             <apex:inputField value="{!newmember.Product_Quantity__c}" required="false"/>  
              </apex:outputPanel> 
    </apex:pageBlockSectionItem>         
             </apex:pageBlockSection>
             
     
              
   <apex:pageBlockSection title="End Customer Decision Maker" id="EndCustPageBlockSection">
    <apex:pageBlockSectionItem id="firstname">    
                         <apex:outputLabel value="First Name" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />
        <apex:inputField value="{!newmember.First_Name__c}" required="false" id="FirstName"/>
         </apex:outputPanel> 
    </apex:pageBlockSectionItem>   
      <apex:pageBlockSectionItem id="lastname">    
                         <apex:outputLabel value="Last Name" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />
        <apex:inputField value="{!newmember.Last_Name__c}" required="false" id="LastName"/>    
         </apex:outputPanel> 
    </apex:pageBlockSectionItem>    
      <apex:pageBlockSectionItem id="email">    
                         <apex:outputLabel value="Email" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />
        <apex:inputField value="{!newmember.Email__c}" required="false" id="Email"/>
         </apex:outputPanel> 
    </apex:pageBlockSectionItem>   
        <apex:inputField value="{!newmember.Phone__c}" required="false" id="Phone"/>        
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Helpful Links">
      <p>
         <a href="http://partners.merunetworks.com/apps/f?p=portal:redirect:::::PGID:38" target="_blank">XPress Cloud Deal Registraiton FAQ</a>
         <br />
         <a href="" target="_blank">XPress Cloud terms and Conditions</a>
      </p>
   </apex:pageBlockSection>
    
       
   <apex:pageBlockSection title="Deal Information" id="DealPageBlockSection">   
    <apex:pageBlockSectionItem id="closedate">    
                         <apex:outputLabel value="Estimated Close Date" />
                         <apex:outputPanel layout="block" styleClass="requiredInput">
                          <apex:outputPanel layout="block" styleClass="requiredBlock" />    
       <apex:inputField value="{!newmember.Estimated_Close_Date__c}" required="false" id="EstimatedClosedate"/>
       </apex:outputPanel> 
    </apex:pageBlockSectionItem>   
    
       <apex:inputField value="{!newmember.Project_Overview__c}" required="false" id="ProjectOverview"/>
       <apex:inputField value="{!newmember.Competitor__c}" required="false" id="Competitor"/>    
       <apex:inputField value="{!newmember.Will_you_manage_the_customers_AP_Network__c}" required="false" id="ManageAPNET"/>             
   </apex:pageBlockSection>

      
                

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

Thanks
Sudhir
Hi all,

I am using following code to genrate sign, It is working fine in summer 16 salesforce release but my org it autmatically upgraded to winter 17 and this code starts giving follwoing exception:-

"EXCEPTION: System.SecurityException: Invalid Crypto Key
STACKTRACE: Class.System.Crypto.sign: line 35, column 1
AnonymousBlock: line 7, column 1
AnonymousBlock: line 7, column 1
LINE: 35 COLUMN: 1"


can any one help me on this???
string modifiedPrivateKey = 'MIIEpAIBAAKCAQEA1l9J+lUhM3RIADiLy2ajqUjltBqSVMthUlNnu8GsN4z85aniBIDebY+RkFhKDDW9hu8xM/Q4NEI7klmCVWI5BnobWfUjRbhd9oW94qBP7B1Ka6BsSn3RbfvGZZLcDNXd6806acpgMn79fjYPUQPI1kSfrd1GeMDQDGtNFsnCTd9zq2Vye4RQJrlDzC7g70i3jEHCh853ifD4MaQwo+SWf/eF7bLqA+81qUB2llRyA7SH9YF1I/ZmgH57MVTXb62HRMr/JxERDOerHLt7CK9hdbmM3vpRZz8MJnIMrNJKXXbxS69F8aLK7q+8i8xkl1IRwWVD9uJJaWpz7NEBs9EenwIDAQABAoIBACRDLjJoYBtiGiPfbNZVYG3sZN7Yd9RcKvRQI4YBNu6WrNj0qcT1P6rs1ETEipISLSM8JuiQ8Uj1wzn4ZjGnUdokoafP7c2HaG2hJgPF9n8MXWBjXK4lJl4ibucTtqF9M/MFXlIy557jGGJXJrQfncORDCnO+nLGuuq+4+Vs769YQ+bfj69pzfo4kUKaZRj6tgDcAo9Owbe6b7t1gGIM1fo+1fnyZrgYUxwor6periyvjefJaw8N78ASXbu9zHvVrbqaZmwXRJqCRRm8yYigGwQoxLX1DEryrSSCOEZWNUYzG+Det8XuvmsfRkYfw9p/Bz5XO5V70eU5zq5sw6qGkuECgYEA7feem7nGKMFyEVD9st8jhRvOD3n+Z5QAsbaCN5u3GkvXyKXeD7c0RYP4EPtVjEFcB+jy0zktl4Eks+iz7HhGvQhykQx5s5JC5k6P0Rsd+7YOU/8YsuSOvlXnnuclCzpoX1iClYVTJVQ9U7axbE3P07blQ3PqBu1pZ2XPC/sstRkCgYEA5p3xo4/gHQy65qpmh6EHtW2WlQDxbhLBCok8lCEioZaGK9PyNesGsuTcPLU4bj+mch3Yggn7aHfL/zXjdt4K5KWM6wVyK7KNgDisoJzA7fC4u+3VptLjeWKi+xVhPHLmnmuQP3Dq6SDCF2xbuIvynW0jiujdw6NQWYLo+NT+cHcCgYEAvocbvqMnPUplAehOuABgeBqjCVErl9KwG5l8+Pj7yVogEs561Sph96aJ307cV8ec39hrUyLclgkYUdNm+1XxjThOQkQyzMu2NJ+CFnIXt4k0P5xnMhQ9FbfCE0AOMMc6+dvr8bslryWbVINZ2tUSKPiu5yrPnWxIkDi7ZWRdj0ECgYASqR8fZAn3b8tD1O/884vDI332yp++j2ftaVNsjQ3XU23B6CGGOWFOYnRruSI60Y2vWDjntNUSC/eGzB5+xNLO05KGhedKH+WRRYS6blSyLDNWiZUrLY9YiCG1/XHjyUxd70g5yfJIMO1jpdH6KeDU2jrxB4zCQtnClHQzhlCcWwKBgQDGF4JypvYibSkfoiGHQR0Lq3U4l69t5KRcpBYuWdugPdBcdLUOlYOf+6ZPoH+gpk0Awlu+ZqgWfxPTa7eHLxIwCb2Y81bfrCISiUlUUJnPcE7bNrSnoskTQb8flqtGYT94eux0MKktRg6Wojrug/p7kvr7K1zA+zrfjvUK4Rc5LA0K';
string jwtClaims = 'eyJpc3MiOiJ5bnFpNTYzc3hzMDh4ZWR6ajM2a29lenduczZ1ZmRyMCIsInN1YiI6IjI4NTc5Mzg5NCIsImJveF9zdWJfdHlwZSI6InVzZXIiLCJhdWQiOiJodHRwczovL2FwaS5ib3guY29tL29hdXRoMi90b2tlbiIsImp0aSI6InRKVFRwUklmRFhFUlNkNjFBS0hIam9wUm41ZEVSMjBMIiwiZXhwIjoxNDc2MDg4ODA4fQ';
string jwtHeader = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InAwbXE4aHZqIn0';
String algorithmName = 'RSA-SHA256';
Blob input = Blob.valueOf(jwtHeader + '.' + jwtClaims);
Blob privateKeyBlob = EncodingUtil.base64Decode(modifiedPrivateKey);
Blob signed = Crypto.sign(algorithmName, input, privateKeyBlob);
Thanks Anurag
 
Hi Experts,
 
In our salesforce application, we are using below objects.

Objects and Fields

Below are case records.

Case Records

Perfect – If project having single case record, Total_Recurred_Hours__c showing correct value like 110 (i.e. 40+20+50).
Wrong – If project having two or more than two records, Total_Recurred_Hours__c showing wrong value like 160 (i.e. previous case record 110 value + 20 + 30). But it should be showing 20+30= 50 for second case record.

Below are my case record images

Case Record_1 for Rest Projet:

Case Record_1

Case Record_2 for Rest Projet:

Case Record_2

Anyone sort out my issue, Thanks in advance.
 
Thanks,
Manu