• jwillans
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 17
    Replies
We're experiencing some unexpected behaviour with the metadata API and would like to get some diagnostics on calls to the API which are evaluated asynchronously. Here is a sample of the code we are using to do this:

AsyncResult[] result = binding.create(metadata);
for(int z=0;z
AsyncResult r = result[z];
AsyncRequestState state = r.getState();
while(state.equals(state.InProgress)) {
System.out.println("Seconds: " + r.getSecondsToWait());
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
state = r.getState();
} System.out.println("Status: " + r.getStatusCode());

The issue is that the transaction seemingly never completes, it remains in the InProgress state with 10 seconds remaining and never exits the loop. Could someone give me a sample example of how errors should be extracted from metadata calls in this way?

Thanks,

James
Is it possible to update a modified DescribeLayout object via the partner API? We are adding a new DescribeLayoutItem to a DescribeLayoutRow. We presumed that because DescribeLayoutRow has setLayoutItems, that this was not a read-only API, but we can't figure out the method of creating the update?

Thanks,

James
It is possible using the enterprise API to create data using the approach described here:

http://www.salesforce.com/us/developer/docs/api/index.htm

Is it possible to achieve the same end through the "partner" API. For example, rather than concrete Java types:

Opportunity newOpportunity = new Opportunity();
newOpportunity.setStageName("Prospecting");
SaveResult[] results = binding.create(new SObject[] {newOpportunity});

Can the description of object types be captured in data, for example:

SObject opportunity = new SObject();
sobject.setType("Opportunity");

/* Missing bit: some code to describe the stage name */

SaveResult[] results = binding.create(new SObject[] {newOpportunity});

Thanks,

James

Message Edited by jwillans on 08-08-200707:42 AM

Is it possible to define a "Lookup Relationship" that can be bound to multiple values? This seems a fairly fundamental part of data modelling, perhaps there is an alternative way of achieving the same end?

Thanks,

James
We're experiencing some unexpected behaviour with the metadata API and would like to get some diagnostics on calls to the API which are evaluated asynchronously. Here is a sample of the code we are using to do this:

AsyncResult[] result = binding.create(metadata);
for(int z=0;z
AsyncResult r = result[z];
AsyncRequestState state = r.getState();
while(state.equals(state.InProgress)) {
System.out.println("Seconds: " + r.getSecondsToWait());
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
state = r.getState();
} System.out.println("Status: " + r.getStatusCode());

The issue is that the transaction seemingly never completes, it remains in the InProgress state with 10 seconds remaining and never exits the loop. Could someone give me a sample example of how errors should be extracted from metadata calls in this way?

Thanks,

James
Is it possible to update a modified DescribeLayout object via the partner API? We are adding a new DescribeLayoutItem to a DescribeLayoutRow. We presumed that because DescribeLayoutRow has setLayoutItems, that this was not a read-only API, but we can't figure out the method of creating the update?

Thanks,

James
It is possible using the enterprise API to create data using the approach described here:

http://www.salesforce.com/us/developer/docs/api/index.htm

Is it possible to achieve the same end through the "partner" API. For example, rather than concrete Java types:

Opportunity newOpportunity = new Opportunity();
newOpportunity.setStageName("Prospecting");
SaveResult[] results = binding.create(new SObject[] {newOpportunity});

Can the description of object types be captured in data, for example:

SObject opportunity = new SObject();
sobject.setType("Opportunity");

/* Missing bit: some code to describe the stage name */

SaveResult[] results = binding.create(new SObject[] {newOpportunity});

Thanks,

James

Message Edited by jwillans on 08-08-200707:42 AM

Is it possible to define a "Lookup Relationship" that can be bound to multiple values? This seems a fairly fundamental part of data modelling, perhaps there is an alternative way of achieving the same end?

Thanks,

James
Hello again,

Is there any way that you can import a data model or UML model into
Apex and thus automatically create Custom objects (database tables)?

Thanks,

Andy