javascript
Copy code
fetch('https://yourInstance.salesforce.com/services/data/vXX.X/sobjects/Account/001D000000INjVe', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
if (response.ok) {
return response.json();
}
throw new Error('Network response was not ok.');
})
.then(data => {
console.log('Account Details:', data);
// Gunakan data akun di sini
})
.catch(error => {
console.error('There was a problem with the fetch operation:', error);
});