• Andy Putra
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
Hello Every one,
I've got error when call web service.
 First error: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
Any idea what's going on?

Many thanks
Hi,  i see mixed answers all over the web regarding what is required for a SOAP Login authentication.  Some answers are Username and password and Security Token while others are saying Username and Password and Organization Id.

I think I am getting it as username and password are the only thing required and security token is optional depending on network ip settings
For communities it would be username and password and Organization id.

Can someon help me understand what is exactly required?

Hello, 

I am attempting to use inputText on a VF page and can't figure out how to save the value to the record.  Does anyone have an example of this that I could bootstrap off of? 

I am using a custom object & controller. 
 

Here is the string from the VF page: 
 

apex:inputText value="{!spotObj.Workload__c}"/> <apex:commandButton value="Save" action="{!saveSpot}"/>
And here is my controller: 
 
public with sharing class SpotsInProcess{

    public List <Job_Number__c> listOfInProgress {get;set;}
    public Job_Number__c InProgress  {get;set;}

public PageReference saveSpot(){
    UPDATE listOfInProgress;
    return null;
    }


public SpotsInProcess(){
    listOfInProgress = [Select id, name, Workload__c, Notes__c, Thumbnail_URL__c, ISCI__c, Title__c,   First_Air_Date__c,  Last_Air_Date__c, Project__c, Campaign__r.Name, Nets_Running__c, View_Link__c, Internal_Title__c, Legal__c, Airing_Agencies__c from Job_Number__c where Job_Status__c = 'In Progress']; 
}
}

It would mean the world to me if someone could help me out!

Thanks in advance! 
 
When Opportunity is updated, it fires after Update trigger and updates contract and an exception occurs on updating contract how to show an error message on the opportunity.
Use Case whenever we will select a particular travel request(through lookup) from expense then data
from that travel request (Name + account, related to that travel request) concatenately should
populate Claim purpose field in expense.

Datapopulate:-

public with sharing class DataPopulate {
 public Travel_Request__c trq {
  get;
  set;
 }

 private ApexPages.StandardController stdCtrl;

 public DataPopulate(ApexPages.StandardController std) {
  stdCtrl = std;
 }

 public void doInsert() {
  Expense__c exp = (Expense__c) stdCtrl.getRecord();
  if (exp.Travel_Request__c == null) {
   return;
  } else {
   trq = [select Name , Proposed_Client_to_Visit__r.Name, Status__c from Travel_Request__c where Id =
: exp.Travel_Request__c LIMIT 1];
    System.debug('The record fetched '+trq);
 
   //exp.Branch__c = trq.Branch__c;
   //exp.Period_To__c = trq.Travel_Start_Date__c;
  // exp.Period_From__c = trq.Travel_End_Date__c;
   //exp.Department__c=trq.Department__c;

   exp.Claim_Purpose__c= trq.Name +''+ ' -- '+''+ trq.Proposed_Client_to_Visit__r.Name ;
   upsert exp;
  System.debug('The record insert '+exp);
  }
 }
}

test class:

//Test class for DataPopulate


@isTest
public class DataPopulateTest
{
 //setup test data for Class
 @testSetup  static void testSetDate()
 {
    Travel_Request__c trq = new Travel_Request__c();
    trq.Name='TestTravel' ;
    trq.Proposed_Client_to_Visit__c='T-System'; 
    insert trq;
     
    Expense__c expObj = new Expense__c();
    expObj.Travel_Request__c='TestTravel';
   // expObj.Period_To__c= system.today();
    //expObj.Period_From__c= system.today();
    insert expObj;
 }
 @isTest static void testPopulate()
 {
    Travel_Request__c trq = [SELECT id from Travel_Request__c where Name = 'TestTravel' ][0];
    
    Test.setCurrentPage(page.Expense);  
    
    Apexpages.currentPage().getParameters().put('Id',trq.Id);
    
   
     
     ApexPages.StandardController stdCon = new ApexPages.StandardController(trq);
     DataPopulate dClassObj = new  DataPopulate(stdCon);
    
     dClassObj.doInsert();
    // List<Expense__c> expObj=[SELECT Claim_Purpose__c from Expense__c WHERE
Travel_Request__c=:trq.id Limit 1];
    // Boolean result = expObj.equals('TestTravelT-System');
    // System.assertEquals(result,false);
 }
 
}