• rajan
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 7
    Replies
    Hi ,

I am trying to call the retrive API of new Metadata spring pre relies 2008 API.My code is

  1.                 binding_MS = new MetadataService();
  2.                 binding_MS.SessionHeaderValue = new         Automation_Tool_1._1.NewMetaSforce.SessionHeader();
  3.                 binding_MS.Url = binding.Url;
  4.                 binding_MS.SessionHeaderValue.sessionId = binding.SessionHeaderValue.sessionId;
  5.                 DescribeGlobalResult aa = binding.describeGlobal();
  6.                 RetrieveRequest RR = new RetrieveRequest();
  7.                 RR.packageNames = new string[] { "testingPack" };
  8.                 RR.singlePackage = true;
  9.                 AsyncResult Aresult = binding_MS.retrieve(RR);
  10.                 DescribeMetadataResult abc = binding_MS.describeMetadata();


But at the retrive  call (bold line in code line 9 ) I get the exception
No operation available for request {http://soap.sforce.com/2006/04/metadata}retrieve

any idea anybody ,please help

Thanks,
Rajan

  • January 23, 2008
  • Like
  • 0
Is there any document whic give me the MetaData API calls with .Net C# examples  .
  • January 14, 2008
  • Like
  • 0

Hi I need to download everything related with a Sales force application like S-Controls, tabs ,Documents Folders etc ,So any idea how to do it using .NET or any of the relayed API example or related code example please post ASAP.

Thanks
Rajan Jasuja

 



  • January 10, 2008
  • Like
  • 0

Hi I am using the SalesForse Document ID  in some of my S-controls coding .When I copy the S-Controls from one project to another project ,Of course I have to upload those related documents(Images, Logos and others) into  Sales force whose ID I am using in S-Controls.
But the problem is this time Document ID is changed and I have to replace the new ID with old one into related S-Controls manually.
I want to create an application in .NET which does it automatically, to do so I have to retrieve all S-Control and after modification i have to upload them again into SF.
Please help me any one tells me is there any way to do so.

  • January 10, 2008
  • Like
  • 0
I have created a field external_opp_id in my opportunity and marked is as an external ID field. When it comes to task, the data loader GUI, it doesn't give me an option to select External ID field. It assumes SF field to be there. It works when I put SF Id for opportunity. but I really need to do it through external ID, as the numbers of both tasks and opportunity are huge.
Quick help is appreciated.



  • July 11, 2007
  • Like
  • 0
I need to add and delete some fields in Account, I also need to set them value.
For example:
I want to do a loop to add field which name is in " filed1, field2,......fieldN "
I also need to do a loop to set value on " filed1, field2,......fieldN "
I can't make sure how many fields I should operate, so I don't know which number is "N".
Can I use api to do it?
  • January 30, 2008
  • Like
  • 0
Running into a rather frustrating problem with using the Metadata API to update a Picklist field.

The first problem is that the API requires that you provide the PickList values when performing an update even though you may not need to change the pick list values. 


Second, when you provide the PickList values (using the same syntax that works with  a create) you get an error saying  "INVALID_FIELD" error with the message "Failed to create picklist value:<picklist value>".

Code:
                CustomField cfStatus = new CustomField();

  cfStatus.setFullName("MyExistingObj.Status__c");
  cfStatus.setDescription("The Status");
  cfStatus.setType(FieldType.Picklist);
  cfStatus.setLabel("Status");
  
  Picklist pl = new Picklist();
  PicklistValue [] statusValues = new PicklistValue [] {new PicklistValue("Saved",false)};
  pl.setPicklistValues(statusValues);
  cfStatus.setPicklist(pl);

  UpdateMetadata updateMetadataStatus  = new UpdateMetadata();
  updateMetadataStatus.setMetadata(cfStatus);

  updateMetadataStatus.setCurrentName("MyExistingObj.Old_Status__c");
  
sfdc.update (new UpdateMetadata [] {updateMetadataStatus});

 
Above is the code that doesn't work.

If I change this into a create action (changing UpdateMetadata out for Metadata and calling the create) it creates the field without a problem.

I am guessing it might be something to do setting the full name on the PicklistValue object but I tried all the variations that I could think of (<custom object>.<field>.<picklist value>, <field>.<picklist value>, ect) and couldn't get it to take. 

So if it does work then I am missing something, 

Any one gotten this to work and if so any examples of what is working?


Thanks for any help. 


    Hi ,

I am trying to call the retrive API of new Metadata spring pre relies 2008 API.My code is

  1.                 binding_MS = new MetadataService();
  2.                 binding_MS.SessionHeaderValue = new         Automation_Tool_1._1.NewMetaSforce.SessionHeader();
  3.                 binding_MS.Url = binding.Url;
  4.                 binding_MS.SessionHeaderValue.sessionId = binding.SessionHeaderValue.sessionId;
  5.                 DescribeGlobalResult aa = binding.describeGlobal();
  6.                 RetrieveRequest RR = new RetrieveRequest();
  7.                 RR.packageNames = new string[] { "testingPack" };
  8.                 RR.singlePackage = true;
  9.                 AsyncResult Aresult = binding_MS.retrieve(RR);
  10.                 DescribeMetadataResult abc = binding_MS.describeMetadata();


But at the retrive  call (bold line in code line 9 ) I get the exception
No operation available for request {http://soap.sforce.com/2006/04/metadata}retrieve

any idea anybody ,please help

Thanks,
Rajan

  • January 23, 2008
  • Like
  • 0

Hi I am using the SalesForse Document ID  in some of my S-controls coding .When I copy the S-Controls from one project to another project ,Of course I have to upload those related documents(Images, Logos and others) into  Sales force whose ID I am using in S-Controls.
But the problem is this time Document ID is changed and I have to replace the new ID with old one into related S-Controls manually.
I want to create an application in .NET which does it automatically, to do so I have to retrieve all S-Control and after modification i have to upload them again into SF.
Please help me any one tells me is there any way to do so.

  • January 10, 2008
  • Like
  • 0
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
I have created a field external_opp_id in my opportunity and marked is as an external ID field. When it comes to task, the data loader GUI, it doesn't give me an option to select External ID field. It assumes SF field to be there. It works when I put SF Id for opportunity. but I really need to do it through external ID, as the numbers of both tasks and opportunity are huge.
Quick help is appreciated.



  • July 11, 2007
  • Like
  • 0