• Iñaki R. Zabalegui
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Program Architect
  • Salesforce

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 1
    Replies
Everytime I try to read from a Custom Object like this:
ReadResult readResult = metadataConnection.readMetadata("CustomObjectTranslation", new String[]{fieldNamePath});

I obtain following error:"Not a valid enumeration for type: class com.sforce.soap.metadata.Gender"
WSC does not support Geolocalization fileds. If you try to use:

ReadResult readResult = metadataConnection.readMetadata("CustomObject", new String[]{objectName});

Then you obtain following exception.

unable to find end tag at:  START_TAG seen ...</fullName><displayLocationInDecimal>... @1:69184

Does anyone know how to fix it? I guess the answer is either implement the SOAP service straight or wait till WSC fixes it right? it is issue #129 in GitHub https://github.com/forcedotcom/wsc/issues/129
HI,

I am building a Java application to update the values of picklists from a CSV using Metadata API. I have been doing some exercises like setting and retrieving info without not problem. Issue I found is the field information given bu readMetadata for standard fields is not valid althoug in the documentation is said it should be used for standard fields as well. Does anyone have any informaion?

A piece of my code

try {
            ReadResult readResult = metadataConnection.readMetadata("CustomField", new String[]{"Account.PersonHasOptedOutOfFax","Account.pdvStatus__c"});
            Metadata[] mdInfo = readResult.getRecords();
            System.out.println("Number of component info returned: " + mdInfo.length);
            for (Metadata md : mdInfo) {
                if (md != null) {
                    CustomField obj = (CustomField) md;
                    System.out.println("Field: " + obj.getFullName());
                    System.out.println("Label: " + obj.getLabel());
                    System.out.println("Type: " + obj.getType());
                    if (obj.getType().toString().equals("Picklist"))  {
                        Picklist listOfValues = obj.getPicklist();//     pdvStatus.setPicklistValues(new PicklistValue[]{unsubmitted, submitted, approved, rejected});
                        PicklistValue[] values = listOfValues.getPicklistValues();
                        for (PicklistValue v : values) {
                            System.out.println("Value: " + v.getFullName());
                        }
                    }
                } else {
                    System.out.println("Empty metadata.");
                }
            }
        } catch (ConnectionException ce) {
        }
Hi,
 
Is it possible to change the integration with GoogleMaps to populate the standard State address field to another address field country dependant? I checked the Maps and Location Settings and of course there is just possible to activate and deactivate this feature. If my client wants to map a Spanish field Province in State (in fact State/Province field) but the field it is never populated when using Googlemap integration. Checkinf if it is possible to map it.
 
Thanks
Hi everyone,

Looking for opinions to find the best way to model following requirements.
- Salesforce client has 400 products.
- Salesforce client has 1000 partners.
- Prices are particular to the Partner-Product.
- A partner can also have related a Price Group if they dont have specific price at Partner-Product level
- Prices have Start Date and End Date.
Options:
- Create as many pricebooks as partners (1000 pricebooks) but this would not cover the dates requirements.
- CPQ (although my client does not want to pay for another license)
- Custom object extending 1 Pricebook with prices and dates + APEX to resolve prices. This custom object would have worst scenario 400K records.

Thoughts?
Hi to the experts out there,
I am trying to execute a synchonous retrieve call via the MetadataConnection.readMetadata method to get the Account object from a developer org. Unfortunately, this is not possible and I get the following error:
unable to find end tag at: START_TAG seen ...</fullName><displayLocationInDecimal>... @1:5165
I am using a current metadata WSDL generated from the same org. I executed an asynchronous retrieve call to get the Account object from the same org (using the Force.com IDE) and found that a field of type "Geolocation" is the cause of this and that the problematic tag appears to be "displayLocationInDecimal". Does anyone know what the problem may be? I am executing the retrieve calls from Java using the Force.com Web Service Connector: https://developer.salesforce.com/page/Introduction_to_the_Force.com_Web_Services_Connector. This is basically the code that throws the error:
... 
connection = com.sforce.soap.partner.Connector.newConnection(config); metadataConfig.setSessionId(connection.getSessionHeader().getSessionId()); MetadataConnection metadataConnection = com.sforce.soap.metadata.Connector.newConnection(metadataConfig); 
... 
ReadResult readResult = metadataConnection.readMetadata("CustomObject", new String[]{"Account"}); 
--> Error
The connection works fine and it is possible to retrieve other objects. It just doesn't work with the Account object holding a Geolocation field. Any ideas and/or support is much appreciated.

Thanks, Joachim