• Yady Kalsi 9
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Hi Guys !!
I am fetching JSON data stream using REST API. I'm filling my custom fields with the JSON data. But I'm stuck in populating lookup field. 
Below is the snippet that does the parsing:

DeviceReading__c obj;
obj = new DeviceReading__c();
while(parser.nextToken() != null) {
       obj.Meter_ID__c = parser.getText(); // Meter_ID__c  is the lookup field of Customer__c object
 }

Please help me 
This is my Visualforce page :
<apex:page controller="MyController">
<apex:pagemessages /> <br />
<apex:form > <apex:commandButton value="Sync Data" action="{!syncData}"/> </apex:form> </apex:page>

I want to show this command button in Accounts Tab. How to do it ?
Note: MyController is an apex class that has the logic that calls the JSON API and bring the data.

Thanks in advance.
Hi Guys

I have an external server with a customer table. I have replicated the table with the attribute fields in my salesforce app. Now I want to populate the customer object in my salesforce app with the data in the server using REST API. 

Please let me know the step by step instruction to do it. Any code would really help.

Thanks in advance.
Hi Guys !!
I am fetching JSON data stream using REST API. I'm filling my custom fields with the JSON data. But I'm stuck in populating lookup field. 
Below is the snippet that does the parsing:

DeviceReading__c obj;
obj = new DeviceReading__c();
while(parser.nextToken() != null) {
       obj.Meter_ID__c = parser.getText(); // Meter_ID__c  is the lookup field of Customer__c object
 }

Please help me 
Hi Guys

I have an external server with a customer table. I have replicated the table with the attribute fields in my salesforce app. Now I want to populate the customer object in my salesforce app with the data in the server using REST API. 

Please let me know the step by step instruction to do it. Any code would really help.

Thanks in advance.