function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mayur$fdc99Mayur$fdc99 

Integration Super badge trailhead challenge: i am getting below error from External system How to Fix this?

External Data Source

Once I clicked on Validate & Sync :
validate & Sync

 

 

Best Answer chosen by Mayur$fdc99
Mayur$fdc99Mayur$fdc99
Hi ,I figured Out: in case any one needed (Declaration mistake was there--->)
public class BillingCalloutService {
    @future(callout = true)
    public static void callBillingService(String projectRef, Decimal billingAmount){
        ServiceCredentials__c srvcCrd = ServiceCredentials__c.getValues('BillingServiceCredential');
                
        BillingServiceProxy.project projectInst = new BillingServiceProxy.project();
        projectInst.username = srvcCrd.Username__c;
        projectInst.password = srvcCrd.Password__c;
        projectInst.projectRef = projectRef;
        projectInst.billAmount = billingAmount;
        
        BillingServiceProxy.InvoicesPortSoap11 invPortSoapInst = new BillingServiceProxy.InvoicesPortSoap11();
        String response = invPortSoapInst.billProject(projectInst);
        
        List<Project__c> lstOfProjects = new List<Project__c>();
        if(response != null && response.equalsIgnoreCase('OK')){
            List<Project__c> lstOfPrjts = [SELECT Status__c FROM Project__c WHERE ProjectRef__c = :projectRef];
            for(Project__c prjt : lstOfPrjts){
                prjt.Status__c = 'Billed';
                
                lstOfProjects.add(prjt);
            }
            
            UPDATE lstOfProjects;
        }
    }
}

 

All Answers

Mayur$fdc99Mayur$fdc99

I am stuck at 7th challenge: Synchronize Salesforce project data with Square Peg's external billing system OF Data Integration Specialist
I'm saving my trigger which  is related to Project object & which is related to  BillingCalloutService: since variables are part of external object it is not allowing me to save my trigger

trigger error 

 

It should show external object .then Error will be resolved. how validation & syn is working for other Folks

Mayur$fdc99Mayur$fdc99
Hi ,I figured Out: in case any one needed (Declaration mistake was there--->)
public class BillingCalloutService {
    @future(callout = true)
    public static void callBillingService(String projectRef, Decimal billingAmount){
        ServiceCredentials__c srvcCrd = ServiceCredentials__c.getValues('BillingServiceCredential');
                
        BillingServiceProxy.project projectInst = new BillingServiceProxy.project();
        projectInst.username = srvcCrd.Username__c;
        projectInst.password = srvcCrd.Password__c;
        projectInst.projectRef = projectRef;
        projectInst.billAmount = billingAmount;
        
        BillingServiceProxy.InvoicesPortSoap11 invPortSoapInst = new BillingServiceProxy.InvoicesPortSoap11();
        String response = invPortSoapInst.billProject(projectInst);
        
        List<Project__c> lstOfProjects = new List<Project__c>();
        if(response != null && response.equalsIgnoreCase('OK')){
            List<Project__c> lstOfPrjts = [SELECT Status__c FROM Project__c WHERE ProjectRef__c = :projectRef];
            for(Project__c prjt : lstOfPrjts){
                prjt.Status__c = 'Billed';
                
                lstOfProjects.add(prjt);
            }
            
            UPDATE lstOfProjects;
        }
    }
}

 
This was selected as the best answer
Mayur$fdc99Mayur$fdc99
Marking as Solved