• Muthouazhagi Dhanapal
  • NEWBIE
  • 40 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 3
    Replies
Hi,
My requirement is that when an account is created/updated/deleted, I need to make an HTTP REST callout to an external system. 
For this, I created a trigger which calls the respective APEX class to make the callout.
In this scenario: User creates an account in Salesforce -> Trigger calls the respective apex class to make HTTP callout to an external system with the details of the created account -> An error is sent by external system -> Since account creation is unsuccessful, I need to delete the account in Salesforce.  What is the best way to handle such scenario ?
Please provide some examples of error handling for HTTP REST Callout cases.
 
Hi, 
Please help me with this.
My requirement is that when an account is created/updated/deleted, I need to make an HTTP REST callout to an external system ie, when an account is created it will make a REST callout to an external system with the details of this account. I have created triggers that will call the respective APEX classes to make the HTTP callout.

I would like to know how I can make a REST HTTP Callout when an account is updated?
What method should I use here ? How to know which fields were updated? Can someone please provide me an example for making HTTP callout that's made when an account is updated ?

Thanking you in advance for the help. 

Hi, 

I would like to know if it's possible to delete a record from the Accounts object using an external Id in JSForce.

As per JSForce documentation, it says 'deletes a record or records given in the first argument.' and in their example, they have used account id. For eg: 
// Single record deletion conn.sobject("Account").destroy('0017000000hOMChAAO', function(err, ret) { if (err || !ret.success) { return console.error(err, ret); } console.log('Deleted Successfully : ' + ret.id); });

I tried to give an external ID but I get an error saying that the  'Provided external ID field does not exist or is not accessible' (even when my external ID exists).

Please help me in solving this issue.

Thanks and regards.

Hi All ,

I have to deploy my changes to Production , unfortunately my production Salesforce has just 59% code coverage because of which I am not able to deploy. On looking into it , I found that there's an auto generated file which has no test class. 
Does anyone came across such file and have test classes ?

I am new to Salesforce and I am not sure how to proceed with this .

Any help is appreciated.

Thank you in advance.

Hi , 

I am trying to deploy my code to production. 

I just have one Apex trigger that I want to deploy, and I have written a test class to test the Apex trigger. 

I was able to achieve 100% test coverage for the Apex trigger.

But production has several other Apex classes , I am getting only 62% test coverage in Production. 

Is this because I also need to write test classes to test the other apex classes? The overall code coverage is affecting?

I am very confused. Someone, please help me with this.

Thanking you in advance.

Hi,
I have created an apex trigger in my developer edition Salesforce, When I tried to Create the same trigger in production Salesforce, only then I found out that it is not possible to create triggers directly in production.
I read about Sandbox and created a sandbox but it has been more than 24 hours and the Sandbox is not yet created and it's still in pending status. 
I read about other ways to deploy without using Sandbox, but I am confused which is the easiest way to deploy.

Can someone please help me?

Should I wait for my sandbox to be created (it's getting very late for me in this case)?

Or what is the best way you suggest for deployment?
Any help would be appreciated.

Thank you very much in advance.

Hi , I am using jsforce to integrate my node.js backend with Salesforce.

I need to handle various errors returned from making a REST API Call to salesforce in my backend
(https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/errorcodes.htm). 

But I see that in jsforce while making a call, it just returns the error message  but not the HTTP code.  I couldn't find even the messages returned in JSForce documentation.

Can anyone please help me with useful links ?

Thanking you in advance.

Hi ,

I have integrated my backend with Salesforce. From the node.js backend, I create/update/delete accounts in Salesforce. All accounts have an  "External ID" with which I uniquely identify the accounts from my backend. When the child account is added, I want to update the ParentAccount field in the Child account. I am aware that this parent account needs to contain the value of the Parent account's ID. But I have only an external ID, not the parent account ID. 
What are the ways to fill the ParentAccount in Child Account to maintain the hierarchy?
Please help.

Thanking you in advance.

Hi ,

I am new to Salesforce development, and I am doing my first project on integrating Salesforce and external systems. My remote system will use the REST API to create/update/delete data in Salesforce. I read the following in the Salesforce document :

"Error handling—All the remote call-in methods, standard or custom APIs, require the remote system to handle any subsequent errors, such as timeouts and the management of retries. Middleware can be used to provide the logic for error handling and recovery.

• Recovery—A custom retry mechanism needs to be created if quality-of-service requirements dictate it. In this case, it’s important to ensure idempotent design characteristics. Platform event enables subscribers to use the replay ID to fetch messages within a certain time period after those messages were published."

Can anyone please tell me what kind of errors and recovery I will have to take care of in my remote system? Any links will be very helpful for me. I am not using any middleware, in what cases should I consider using a middleware. 

Hi,

I am very new to salesforce development and any help will be highly appreciated!

I want to integrate the Standard object "Accounts" with my remote backend. I chose to do it with the Data virtualization method where the data is loaded in real-time. I am aware that we can create an external object and write a custom apex class adapter for performing data virtualization. My doubt is, whether we can do it for the standard object "Accounts", can we load the data in real-time for the Accounts object?

I tried to write a custom adapter with a table name as "Accounts", though it is creating the table the sync is not actually happening with the standard object Accounts.

Thank you !.

Hi , My requirement is that standard "Accounts" records need to be maintained in Salesforce as well as my remote backend. When the account record is created in a remote backend, it has to be created in Salesforce too. Similarly, if an account is created in Salesforce, it has to be communicated with the remote backend. Any update or delete performed in either Salesforce / Remote backend should be respectively communicated so that both Salesforce accounts and remote backend accounts are always in sync with each other.

I want to choose an integration pattern that can gracefully handle this requirement. Since the data has to always be in sync with each other, I chose to go with Salesforce connect by creating a custom Apex adapter as it pulls the data in real-time. But I am not sure if it could be done for the standard Accounts object and whether any Account record created in Salesforce will also be communicated with my backend. 

Please suggest me a good integration pattern for me, it would be very helpful for me.

Hi All ,

I have to deploy my changes to Production , unfortunately my production Salesforce has just 59% code coverage because of which I am not able to deploy. On looking into it , I found that there's an auto generated file which has no test class. 
Does anyone came across such file and have test classes ?

I am new to Salesforce and I am not sure how to proceed with this .

Any help is appreciated.

Thank you in advance.

Hi ,

I am new to Salesforce development, and I am doing my first project on integrating Salesforce and external systems. My remote system will use the REST API to create/update/delete data in Salesforce. I read the following in the Salesforce document :

"Error handling—All the remote call-in methods, standard or custom APIs, require the remote system to handle any subsequent errors, such as timeouts and the management of retries. Middleware can be used to provide the logic for error handling and recovery.

• Recovery—A custom retry mechanism needs to be created if quality-of-service requirements dictate it. In this case, it’s important to ensure idempotent design characteristics. Platform event enables subscribers to use the replay ID to fetch messages within a certain time period after those messages were published."

Can anyone please tell me what kind of errors and recovery I will have to take care of in my remote system? Any links will be very helpful for me. I am not using any middleware, in what cases should I consider using a middleware.