• vermajai1995
  • NEWBIE
  • 0 Points
  • Member since 2019
  • A Full Stack software Developer
  • Cyber Group, India


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
On Opportunity and Sales Order (accounting seed object) we have related list called Opportunity & Sales Order Attachments. This list of attachments is shared between Opportunity and SO.

Issue:

We attach many documents during making and approving before Sales Order is created. Many time there are many files and they become irrelevant once Sales Order is created. I do not want to delete them.

Solution:

I want to archive them or move them to another section. This Archive should be on Opportunity only. Do not show on Sales Order. See below and idea to redesign attachments as one related list. If that does not work separate them in to two.attachment
 

The complete error is:

A problem witht he OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client',

faultstring:"2013-04-30T20:00:08.263+06.5:30' is not a valid value for the type xsd:dateTime',}

 

We have a Take Case button with the following code:

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} 

var caseObj = new sforce.SObject("Case"); 

caseObj.Id = '{!Case.Id}'; 
caseObj.OwnerId = '{!$User.Id}'; 
caseObj.Status = 'In Progress'; 

var roleName = '{!$UserRole.Name}'; 
if((roleName.indexOf("Tier 3") != -1) || (roleName.indexOf("Field Operation") != -1) || (roleName.indexOf("Service Engineer") != -1))
 { 
caseObj.Substatus__c = 'Open with Product Specialists'; 
} 
else 
{ 
caseObj.Substatus__c = 'Open with Support Advocates'; 
} 

if('{!Case.Incident_First_Response__c}'=='') 
{ 
caseObj.Incident_First_Response__c=new Date(); 
} 

var result = sforce.connection.update([caseObj]); 

if (result[0].success=='false') { 
alert(result[0].errors.message); 
} else { 
window.parent.location.href="/{!Case.Id}"; 
}

 

 

 

 

If a users PC time zone is set for any that are +6:30 or +5:30 (not on the hour, but the half hour) and they try to click this button they receive this error.  Is there a way to correct this?

  • April 30, 2013
  • Like
  • 0

below is code how to fix the header of pageblock table .

 

please give me solution if any buddy have.

Thanks.

 

 

 

<apex:page controller="DisplayListDataControllerOnContact" >
<script>window.setTimeout(sayHello,200000000)</script>
<apex:messages />
<style>
 .container
 {

 overflow:auto;
height:100px;

}
.headerStyle
 {
 position:relative;
 top:expression(this.offsetParent.scrollTop);
 z-index: 100;
}
 </style>
 <script type="text/javascript">
     function setTheVal(valFromPopup){
         document.theForm.aField.value=valFromPopup;
     }
 </script>

<apex:form id="theForm" rendered="{!(PopulateData.size != 0)}">
 
  <apex:pageBlock rendered="{!(PopulateData != null)}">
<apex:outputLabel value="Multiple matches returned from Infogroup" style="font-weight:bold"> </apex:outputLabel>  <br/><br/>
<apex:outputPanel layout="block" styleClass="container" >
   <apex:pageBlockTable value="{!PopulateData}" headerClass="headerStyle" align="top" width="100%"  var="Common"  >
            
<apex:column headervalue="Select" >
        
 <input type="radio"   name="rad"  value="{!Common.Id}~{!Common.RuleName}" onclick="changeValue(this,'{!$Component.RadioButtonValue}')"/ >     
     
     </apex:column>
     
  <apex:column value="{!Common.FirstName}  {!Common.LastName}" >
        <apex:facet name="header">Contact</apex:facet>
      </apex:column>  
              
<apex:column value="{!Common.Phone}"  >
        <apex:facet name="header">Phone</apex:facet>
      </apex:column>

 <apex:column value="{!Common.City}"  >
        <apex:facet name="header">City</apex:facet>
      </apex:column>

  <apex:column value="{!Common.StateProvince}"  >
        <apex:facet name="header">State</apex:facet>
      </apex:column>

 <apex:column value="{!Common.PostalCode}" >
        <apex:facet name="header">Zip</apex:facet>
      </apex:column>
       
  <apex:column value="{!Common.CompanyName}" >
        <apex:facet name="header" >Business Name</apex:facet>
      </apex:column>
              
          <apex:column >
        <apex:facet name="header">Line of Business</apex:facet>
      </apex:column>    
          
      
 </apex:pageBlockTable>
      </apex:OutputPanel>


  <apex:inputHidden value="{!selectedValue}" id="RadioButtonValue" />
  <apex:inputHidden value="{!strContactSFId}" id="hidContactSFId" />
 
<!--
 <apex:outputText value="{!selectedValue}" id="out"></apex:outputText>

  <apex:commandButton value="Compare" action="{!save}" rerender="out"  id="theButton" />
    -->
 <br/><br/>

  <apex:commandButton value="Stare & Compare"  onClick="opennewwindow('{!$Component.RadioButtonValue}','{!$Component.hidContactSFId}')"  id="theButton" />
  <apex:commandButton value="Import as New Contact"    id="theButton2" onClick="confirmcontact('{!$Component.RadioButtonValue}')" />
   </apex:pageBlock>
</apex:form>

 <script>
    function confirmcontact(textid)
    {
    

if(document.getElementById(textid).value == '')
{
alert('Please select one record');
return false;
}


return confirm('Are you sure to import new contact');
}

 
   function changeValue(input, textid)
    {
    document.getElementById(textid).value = input.value;
       
     }
           

function opennewwindow(textid,contactSFId)
{

if(document.getElementById(textid).value == '')
{
alert('Please select one record');
return false;
}

var str = document.getElementById(textid).value;
var contactId = document.getElementById(contactSFId).value;
  var requesttype;
 
var temprequesttype;
  var delimiter = "~";
//str = '402586844371~People-LastName';

var  temp = str.split('~');

// alert('hi..' + temp[0].length);
    
var strid;
strid =  parseInt(temp[0]) ;
if(temp.length < 2){
    requesttype = 'Company';
}
else{
    temprequesttype = temp[1];
}
var strsplit = temprequesttype.split('-')
requesttype = strsplit[0];
document.getElementById(textid).value = '';

var myUrl = '/apex/StareComparePageContact?requesttype='+requesttype+'&id='+temp[0]+'&ContactId='+contactId;

var encodetxt=encodeURI(myUrl)

encodetxt = encodetxt.replace('%E2%80%8B','');
/*encodetxt = encodetxt.replace('Ixsd2','');
alert(encodetxt);
alert(decodeURI(encodetxt));
*/
  /*window.name = 'Popup';
  var newwindow = window.showModalDialog(encodetxt,window,'unadorned:yes;dialogHeight:600px;dialogWidth:900px;left:100;top:100;scrollbars:yes;toolbar:no,status=no');
  */
 
  if(navigator.userAgent.indexOf("MSIE")!=-1)
  {
      var newwindow = window.open(encodetxt,'popup','unadorned=yes,height=600,width=900,left=100,top=100,scrollbars=yes,toolbar=no,status=no');  
  }
  else
  {
      var newwindow = window.showModalDialog(encodetxt,window,'unadorned:yes;dialogHeight:600px;dialogWidth:900px;left:100;top:100;scrollbars:yes;toolbar:no,status=no');
  }

  newwindow.focus();

}   
 </script>
 
         

</apex:page>