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
hagaichagaic 

How to define new custom object by partner WSDL

 Hi

 

Do you know if it's possible (via Partner WSDL) new Custom Object in Salesforce ?

How ? (need a code snippet)

 

Thanks

 

Hagai

_Prasu__Prasu_

 

sObject[] arrSObject = new sObject[1];
sObject sObj = new Sforce.sObject();
sObj.type = strType;
sObj.Any = arrElements;
arrSObject[0] = sObj;
if (m_service == null)
m_service = GetService();
Sforce.SaveResult[] arrResult = m_service.create(arrSObject);

 

sObject[] arrSObject = new sObject[1];

 sObject sObj = new Sforce.sObject();
sObj.type = [Objectname];

 

// arrElement is the array of the fieldname and value XmlElement

 sObj.Any = arrElements;

 arrSObject[0] = sObj;

 Sforce.SaveResult[] arrResult = m_service.create(arrSObject);

ArunKumar_RemmaArunKumar_Remma

Hi,

 

How can we define or declare a customer object in an apex class. so that we can use it for custom object fields for search criteria with the standard object fields.

 

public class displayOpportunityDetails
{
    
 // private CustomReport
  private List<Opportunity> oppr;
  private List<Opportunity> getOpportunityDetails()

    {
    
      oppr = [ SELECT Account, Name, Amount, CloseDate, StageName FROM Opportunity 
                            WHERE CloseDate = CustomReport__c.CloseDate__c];
   
      return oppr; 
    } 
}

 

 

In the above mentioned code i am getting unable to locate CustomReport.  Here the search criteria is based on the closedate of the custom object CustomReport and the standard object Opporunity field closedate. So if any one knows how to declare a custom object in  apex class can post their views.

 

 

regards

 

Arun