• smitra
  • NEWBIE
  • 35 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 39
    Questions
  • 17
    Replies

Hi,

I get that error when I try to save this code.

trigger ExampleTrigger2 on Contact (after insert, after delete) {
    if (Trigger.isInsert) {
        Integer recordCount = Trigger.New.size();
        // Call a utility method from another class
        EmailManager.sendMail('aschor@acmeunited.com', 'Trailhead Trigger Tutorial', 
                    recordCount + ' contact(s) were inserted.');
    }
    else if (Trigger.isDelete) {
        // Process after delete
    }
}

thanks,
 

Aron

I need to establish a two way connectivity between salesforce and TIBCO .

TIBCO will provide a public key which will be hosted in salesforce org similarly from salesforce org also we will provide TIBCO a public key for CA signed certificate generated in salesforce. 

When a soap request will be sent from salesforce org to TIBCO this request will be signed by the private key and TIBCO will decrypt the request using there public key 

Please let me know how to store public key in salesforce org ?
and how do I sign with private key while sending the message.
Please tell me how to write the equivalnt of the below code

<ul id="sortable1" class="connectedSortable">
  <li class="ui-state-default">Item 1</li>
  <li class="ui-state-default">Item 2</li>
  <li class="ui-state-default">Item 3</li>
  <li class="ui-state-default">Item 4</li>
  <li class="ui-state-default">Item 5</li>
</ul>

I think using datalist is a possible solution

<apex:dataList value="{!fields}" var="fls" id="sortable1" styleClass="connectedSortable">
        <apex:outputText value="{!fls.key}" id="sortable1" styleClass="connectedSortable"/>
 </apex:dataList>

but I am unable to call jquery using the following code.
Hi All,

I have a dynamic table which displays search result based on differnt entities

common display attribute is name

please let me know how do I incorporate hyperlink with name.

<apex:pageBlockTable rendered="{!ObjectList!=null}" value="{!ObjectList}" var="rec">
                <apex:column value="{!rec.Id}" rendered="{!IF(SelectedFields.size == 0 , true, false)}"/>
                <apex:repeat value="{!SelectedFields}" var="FieldLable">
                    <apex:column value="{!rec[FieldLable]}" rendered="{!IF(FieldLable != '--None--' , true, false)}">
                    </apex:column>
                </apex:repeat>
   </apex:pageBlockTable>






Hi All,

I want retrieve Searchlayout field list for a specific object using describeLayout() method..Can anyone put a code snippent for the same
Please let me know how to display the SOQL query result in VF page in tabular form when the SOQL object type and the associated attributes are dynamic.




Hi All,

I have a SOQL query result in controller like this

(Lead:{Name=Bertha Boxer, Phone=(850) 644-4200, Id=00Q9000000EJ3FDEA1, LeadSource=Web, City=Tallahassee}, Lead:{Name=Phyllis Cotton, Phone=(703) 757-1000, Id=00Q9000000EJ3FEEA1, LeadSource=Web}, Lead:{Name=Jeff Glimpse, Phone=886-2-25474189, Id=00Q9000000EJ3FFEA1, LeadSource=Phone Inquiry}

I want to display the result in tabuler format in visual force page.

Please let me know how to display the result 
Hi All,

I want to retrieve fields from Standard or Custom Object Page Layout.Is there any standard Apex methods which will do that

Hi,

 

I have generated Apex classes for metadata.wsdl,apex.wsdl,partner.wsdl and enterprise.wsdl .Now I need to write code for metadata description casn anyone suggest me how to approach for the same.

I have two custom objects as   master detail relationship.Inorder to retrieve related list from the master record using SOQL query and display it in visualforce page

DescribeSObjectResult[] dsrArray = connection.describeSObjects(new String[] { objectToDescribe });

 

The above line is throwing the below error:

 


com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:enterprise.soap.sforce.com:permissionable' but found 'urn:enterprise.soap.sforce.com:precision'
at com.sforce.ws.bind.TypeMapper.verifyTag(TypeMapper.java:386)
at com.sforce.ws.bind.TypeMapper.verifyElement(TypeMapper.java:415)
at com.sforce.soap.enterprise.Field.loadFields(Field.java:1)
at com.sforce.soap.enterprise.Field.load(Field.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:528)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:506)
at com.sforce.soap.enterprise.DescribeSObjectResult.loadFields(DescribeSObjectResult.java:1)
at com.sforce.soap.enterprise.DescribeSObjectResult.load(DescribeSObjectResult.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:528)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:506)
at com.sforce.soap.enterprise.DescribeSObjectsResponse_element.loadFields(DescribeSObjectsResponse_element.java:1)
at com.sforce.soap.enterprise.DescribeSObjectsResponse_element.load(DescribeSObjectsResponse_element.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:173)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:147)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
at com.sforce.soap.enterprise.EnterpriseConnection.describeSObjects(EnterpriseConnection.java:1)
at com.example.samples.QuickstartApiSample.describeSObjectsSample(QuickstartApiSample.java:171)
at com.example.samples.QuickstartApiSample.run(QuickstartApiSample.java:53)
at com.example.samples.QuickstartApiSample.main(QuickstartApiSample.java:43)

 

 

hi,

 

 i m trying to create a custom field in to standard object  but it is creating in to standard fields  not in custom field.

 and second thing i m not able to create field type  exept Text and AutoNumber.   this is the code that i m using.

 

 

// create a new custom object
                String objectName = "Test4";
                String displayName = "Test4 Object";
                 
                CustomObject co = new CustomObject();
                co.setFullName(objectName+"__c");
                co.setDeploymentStatus(DeploymentStatus.Deployed);
                co.setDescription("Created by gaurav using the Metadata API");
                co.setLabel(displayName);
                co.setPluralLabel(displayName+"s");
                co.setSharingModel(SharingModel.ReadWrite);
                co.setEnableActivities(true);
                 
                // create the text id field
                String custom ="Test";
                CustomField field = new CustomField();
                field.setType(FieldType.Text);
                field.setDescription("The Gaurav");
                field.setLabel(displayName);
                field.setFullName(objectName+"__c");
                // add the field to the custom object
                co.setNameField(field);

 try {
                  // submit the custom object to salesforce
                  AsyncResult[] ars = metadataConnection.create(new CustomObject[] { co });
                  if (ars == null) {
                      System.out.println("The object was not created successfully");
                      return;
                  }
                   
                  String createdObjectId = ars[0].getId();
                  String[] ids = new String[] {createdObjectId};
                  boolean done = false;
                  long waitTimeMilliSecs = 1000;
                  AsyncResult[] arsStatus = null;
          /**
               * After the create() call completes, we must poll the results
               * of the checkStatus() call until it indicates that the create
               * operation is completed.
                   */
                  while (!done) {
                      arsStatus = metadataConnection.checkStatus(ids);
                      if (arsStatus == null) {
                          System.out.println("The object status cannot be retrieved");
                          return;
                      }
                      done = arsStatus[0].isDone();
                      if (arsStatus[0].getStatusCode() != null )  {
                          System.out.println("Error status code: "+arsStatus[0].getStatusCode());
                          System.out.println("Error message: "+arsStatus[0].getMessage());
                      }
                      Thread.sleep(waitTimeMilliSecs);
                      // double the wait time for the next iteration
                      waitTimeMilliSecs *= 2;
                      System.out.println("The object state is "+arsStatus[0].getState());
                  }
                   
              System.out.println("The ID for the created object is "+arsStatus[0].getId());
                }
                catch (Exception ex) {
                    System.out.println("\nFailed to create object, error message was: \n" +ex.getMessage());
                }
    
    }

 

Hi,

 

Once a custom object has been created is it possible to still add custom fields to it? I don't mind if data is lost...

 

At the moment if I click on 'Edit' next to the custom object it only gives me a very limited set of options, none of which allow me to add/change fields.

 

Thanks

 

Matt