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
CooldayCoolday 

I want to send a JSON to third party in Salesforce.

I want to send a JSON to third party in Salesforce but there is a if condition.
How can I send it ?
Apex code -
objWrap.advancePayment = objOpp.Advance_Value__c;
            objWrap.self = objOpp.Self__c ;
            objWrap.isPKS = isPKS;
I have to only send isPKS if the advance__c is equal to 0.

How to achieve this?
vijay Krishnaa 10vijay Krishnaa 10
objWrap.isPKS = objOpp.Advance_Value__c == 0 ? isPKS : null;