+ Start a Discussion
Ramesh Naidu PRamesh Naidu P 

create Product along with Price in single REST Call


create Product along with Price in single 

please help me.
Navee RahulNavee Rahul
Hi ramesh,

this may be your REST class for Creating the Production

global with sharing class FileRestServices{

    global static List<Files__c> doGet() {
        RestContext.response.addHeader('Content-Type', 'text/plain');
        String ProductName  = RestContext.request.params.get('ProductName');
        String FamilyName  = RestContext.request.params.get('FamilyName');
        String ProductCode  = RestContext.request.params.get('ProductCode');
        String CreatedBy      = RestContext.request.params.get('CreatedBy');
        String userId = RestContext.request.params.get('Authorization');       

        sObject sObj = Schema.getGlobalDescribe().get(Product).newSObject() ;  
        sObj.put('Name' , ProductName ) ;  
        sObj.put('Family' , FamilyName) ; 
        sObj.put('ProductCode' , ProductCode ) ;  
        sObj.put('CreatedBy' , CreatedBy) ;  
        insert sObj ;

D Naveen Rahul.
Ramesh Naidu PRamesh Naidu P

using above i had send only product information. i need send price along with the product information

Ramesh Naidu PRamesh Naidu P
Any one can help me. i want insert at time two or more Object data using salesforce