• dai.odahara
  • NEWBIE
  • 0 Points
  • Member since 2007

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

 Does anyone know how to update picklist value from metadata api?

 I wrote an xml message as followings referring http://www.salesforce.com/us/developer/docs/api_meta/index.htm, but it does not work well.

 

In this case, with the first picklist values that currentname and fullname are different,  it supposed to be updating the picklist  value. but on the contrary as result, this picklist would have 3 picklist values -

"next month", "this month", "xxxx".

 

 The value of "this month" is being treated as new picklist value...any clue on this..?

 

*********************

<soapenv:Body>
 <update>
  <UpdateMetadata>
  <currentName>Account.salaryDay__c</currentName>
  <metadata xsi:type="ns2:CustomField">
    <fullName>Account.salaryDay__c</fullName>
    <label>payday</label>
    <type>Picklist</type>
    <picklist>
     <sorted>true</sorted>
     <picklistValues>
      <currentName>next month</currentName>
      <fullName>this month</fullName>
     </picklistValues>
     <picklistValues>
      <currentName>xxxx</currentName>
      <fullName>xxxx</fullName>
     </picklistValues>

   ....

   </soapenv:Body>
  </update>
 </UpdateMetadata>

*********

 

Thank you so much

 hi, I've developed an app that enables to work on custom fields. With this app, you can create/read/update/delte custom fields on your browser. you dont need any client tool except web browser. This app consists of visualforce and apex code.

 

you can see an image below.

 

read/delete

create

update

 

I'm gonna publish it to the appexchange site.

Message Edited by dai.odahara on 02-23-2009 11:51 PM
Gentlemen, this might be a meaningless question, but is it possible for salesforce to have other web service interface like restful, protocol buffer, etc? Is there only way to use Soap-based web service?
Hi, does anyone know why I can not decode this string bellow correctly..?
Upon seeing metadata wsdl, zip file is base64binary, so I tried to decode as base64 manytimes..but ghost charactoers coming...

Yes, my environment is based on utf8 charset but something seems wrong with it...

-- original zip file value by meta data api ---
UEsDBBQACAAIADYRTDkAAAAAAAAAAAAAAAAnAAAAcmVwb3J0cy9Gb2xkZXJfMy9OZWVkQ2FyZUFjY291bnQucmVwb3J0pVRda8MgFH3Pryh5X+3GGGNYhyTpKLTpSMxgT0WM7YREg5p+7NdPkq7NvliX5Sn3nHOvR69XeL8ri8GGayOUHPuXw5E/4JKpXMj12M/I5OLWv0ceTHiltB04sTRj/8Xa6g4Ao2g1NCulGR8yVYKr0egGjK5ByS3NqaU+8gbug0wVdSlNGzXISvAiR1kaJekwxvMIghZp9eBDwo/pOAgWWUz6FyDPj/0SE0ym8UOv1DCLliEm/dad4ZQss8fe+TgMkyhNL5cp+a2E62pJLZpTq8XOKduw5dZa1ZW7IAYzrUx3Gdd1/qCprAuqhd2jkO4h+AyedSQNb9ydW+ica4QNg+AUHix/a+RkL1Rb+V9zP16yvxk8WYGSlhzFnOcB1RwzpmppIWjQVqCbWSP7iqMDPRPGSTp4KzRMuX+l11SKV2rdBDsLDXbgX9Q2dLMoCoOsrrljO4h33EHQdL7Thw7onbNPK0o+0W4HE1HYd/R45l/Kd8CTUkiXuaEFmsYkSp7wbBlkKVnMITgyh0P9shoE7fOEvDdQSwcI8/QBnZQBAADPBAAAUEsDBBQACAAIADYRTDkAAAAAAAAAAAAAAAAZAAAAcmVwb3J0cy9Gb2xkZXJfMy1tZXRhLnhtbLOxr8jNUShLLSrOzM+zVTLUM1BSSM1Lzk.....

--- result of decoding --
......reports/Folder_3/NeedCareAccount.report・T]kテ }マッ(y_枻 cX??エ飃フ`OE醐Д?~?O聴ヘセX怜)sッGッWxソ+驚?#?菶テ?熬ゥ\ネマネ葢ヨソG Lx・エ 8ア4c?レ?- ....

Thanks in advnace
Hi, can anyone be enough kindly to give me a soap example of metadata api for getting document??

Thank you so much in advance,
Hi, does anyone can retrieve dashboard component with meta data api 14.0? (prelease env)

When I tried it, salesforce retursn data bellow only against my will. (I wanted to get dashboard component..).
Does someone know why this is happening..?

****************** response soap from salesforce **************
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="http://soap.sforce.com/2006/04/metadata">
    <soapenv:Body>
        <listMetadataResponse>
            <result>
                <createdById>005t0000000tVaNAAU</createdById>
                <createdByName>Dai Odahara</createdByName>
                <createdDate>2008-09-11T08:52:35.000Z</createdDate>
                <fileName>
                    dashboards/dashboards/CompanyDashboards.CompanyPerformanceDashboard/AdoptionDashboard.dashboard
                </fileName>
                <fullName>
                    dashboards/CompanyDashboards.CompanyPerformanceDashboard/AdoptionDashboard
                </fullName>
                <id>01Zt0000000DqdsEAC</id>
                <lastModifiedById>005t0000000tVaNAAU</lastModifiedById>
                <lastModifiedByName>Dai Odahara</lastModifiedByName>
                <lastModifiedDate>
                    2008-09-11T08:52:35.000Z
                </lastModifiedDate>
                <type>Dashboard</type>
            </result>
            <result>
                <createdById>005t0000000tVaNAAU</createdById>
                <createdByName>Dai Odahara</createdByName>
                <createdDate>2008-09-11T08:52:35.000Z</createdDate>
                <fileName>
                    dashboards/dashboards/CompanyDashboards.CompanyPerformanceDashboard/CompanyPerformanceDashboard.dashboard
                </fileName>
                <fullName>
                    dashboards/CompanyDashboards.CompanyPerformanceDashboard/CompanyPerformanceDashboard
                </fullName>
                <id>01Zt0000000DqdtEAC</id>
                <lastModifiedById>005t0000000tVaNAAU</lastModifiedById>
                <lastModifiedByName>Dai Odahara</lastModifiedByName>
                <lastModifiedDate>
                    2008-09-11T08:52:35.000Z
                </lastModifiedDate>
                <type>Dashboard</type>
            </result>
        </listMetadataResponse>
    </soapenv:Body>
</soapenv:Envelope>
Hello, guys. Does anyone succeed in hitting metadata api like create method?
Now I'm trying it but an error saying "INVALID_SESSIN_ID" occurs.

I'm doing like below with java client, but it does not work.
---
Calls login() which is part of the enterprise WSDL and, if the login succeeds:
  • Sets the returned sessionId into the session header for the metadata SOAP binding. This is required for session authentication on subsequent metadata API calls.
  • Resets the endpoint to the returned metadataServerUrl, which is the target of subsequent metadata API calls.

    All client applications that access the metadata API must complete the tasks in this step before attempting any subsequent metadata API calls.

---

does someone have any hint..? my soap message is the followings.

--

<v:Envelope xmlns:i="http://soap.sforce.com/2006/04/metadata"
    xmlns:d="http://www.w3.org/2001/XMLSchema"
    xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:t="http://soap.sforce.com/2006/04/metadata">
    <v:Header>
        <v:SessionHeader n0:mustUnderstand="0"
            n1:ns1="http://soap.sforce.com/2006/04/metadata" xmlns:n0="soapenv"
            xmlns:n1="xmlns">
            <v:sessionId n2:type="xsd:string" xmlns:n2="xsi">
           xxxxx(session id)
            </v:sessionId>
        </v:SessionHeader>
    </v:Header>
    <v:Body>
        <t:create id="o0" c:root="1">
            <metadata n3:type="t:metadata"
                xmlns:n3="http://www.w3.org/2001/XMLSchema-instance">
                <fullName n3:type="d:string">
                    Event.ByMetaDataAPI__c
                </fullName>
                <label n3:type="d:string">ByMetaDataAPI</label>
                <length n3:type="d:int">100</length>
                <type n3:type="d:string">Text</type>
            </metadata>
        </t:create>
    </v:Body>
</v:Envelope>
--

thank you very much,

Ciao, guys. I'm thinking that I'd start Android open-source project focusing on Salesforce using Apex API. Android is based on Java application, so I've writing my app in Java JDK6.

I succeeded in connecting to salesforce thru SOAP base web serivce so far. Now I'm cleaning up my source code and then am ready for starting source code on...google code or so.  I'm writing serveral articles about my salesforce android on http://lg3d.blogspot.com/

When I post my code, I'll add a comment to this thread again so please join in if you're interested in it..

Grazie so much,
Hi, does someone know how to set the proxy server to the Email2Case??
Does the Email2Case allow us to use the proxy server..?

Please let me know if you guys know about it..


Thank you so much,
- Dai Odahara





Hello, do anyone know how to align tags smoothly??

When it comes to a field that is already binding to an Object, it's been aligned, but fields that I add myself
are NOT aligned (exactly speaking, different alignment from a field object binded).

So when adding these two types of field, the page looks ugly....do you know some workaround of this phenomenan??

Thank you very much,
Hi, I'm trying to gather all fields of Object. For instance, Name, Id, Tel, WebSite,....of Account.
I know we could do it with Force.com API - describeSObject( Account ), but do you know how to do it with Apex Code?

Please let me know if anyone knows it...

Thank you very much,
Hi, I'm coding visualforce page.

I want to implement picklist item by visualforce but I cant see picklist tag element with visualforce reference guide..

Does anyone know how to code it or Should I write picklist code by javascript in <script> tag??

Thank you very much
Ciao, folks. Does anyone know how to indicate CaseHistory Sobject?

As you may know, we could not get prefix of Casehistory according to API doc.
In this case, does not it matter to use "017" strings instead...??

Thank you very much,
Hi, guys.

I'm trying using java applet app in s-control but I can't.
"Null pointer exception" occurs when excuting the java applet :(

My questions are below.
1. where do I upload the class files? to document folder?
2. Is source code correct to describe java applet?

<html>
<applet code="Sample.class" codebase="{!Scontrol.JavaCodebase}" archive="{!Scontrol.JavaCodebase}{!Scontrol.JavaArchive}"
height="315" height="300">
</applet>
</html>

Does anybody know how to do it? Thank you very much in advnace!
Hi, I'm coding visualforce page.

I want to implement picklist item by visualforce but I cant see picklist tag element with visualforce reference guide..

Does anyone know how to code it or Should I write picklist code by javascript in <script> tag??

Thank you very much
(If there's a better place to post this question, please let me know. Thx.)

I'm trying to figure out how to enable my new Winter 09 Developer Edition Org for Sites Developer Preview. I'm following the directions in Tutorial #8, Create a Public Web Page Using Force.com Sites (http://www.adnsandbox.com/df08/workbook-sites.pdf):

Step 1: Enable your Developer Edition Organization for Sites Developer Preview

Force.com Sites is currently in developer preview. As such, functionality is subject to change.

To enable your Developer Edition organization for Sites Developer Preview:

1. Open a browser and navigate to http://developer.force.com/sitespreview.
2. Fill out the new member form or use the existing member shortcut.

In a few moments, Force.com Sites will be enabled for your Developer Edition organization.
You can verify that Force.com Sites has been enabled for your Developer Edition organization by clicking Setup➤Develop.
You should see the link for Sites.

When I go to http://developer.force.com/sitespreview, I get a page where I can register for the webinar using the existing member shortcut, which I've done. However, there's nothing that refers to enabling Sites for my Developer Edition org. I've waited at least 15 minutes since registering (more than the "few moments" that the tutorial says), and when I go to Setup / Develop, I don't see the link for Sites.

How do I enable Force.com Sites in my Developer Edition org?

Thanks,

Jeri

Hi, does anyone know why I can not decode this string bellow correctly..?
Upon seeing metadata wsdl, zip file is base64binary, so I tried to decode as base64 manytimes..but ghost charactoers coming...

Yes, my environment is based on utf8 charset but something seems wrong with it...

-- original zip file value by meta data api ---
UEsDBBQACAAIADYRTDkAAAAAAAAAAAAAAAAnAAAAcmVwb3J0cy9Gb2xkZXJfMy9OZWVkQ2FyZUFjY291bnQucmVwb3J0pVRda8MgFH3Pryh5X+3GGGNYhyTpKLTpSMxgT0WM7YREg5p+7NdPkq7NvliX5Sn3nHOvR69XeL8ri8GGayOUHPuXw5E/4JKpXMj12M/I5OLWv0ceTHiltB04sTRj/8Xa6g4Ao2g1NCulGR8yVYKr0egGjK5ByS3NqaU+8gbug0wVdSlNGzXISvAiR1kaJekwxvMIghZp9eBDwo/pOAgWWUz6FyDPj/0SE0ym8UOv1DCLliEm/dad4ZQss8fe+TgMkyhNL5cp+a2E62pJLZpTq8XOKduw5dZa1ZW7IAYzrUx3Gdd1/qCprAuqhd2jkO4h+AyedSQNb9ydW+ica4QNg+AUHix/a+RkL1Rb+V9zP16yvxk8WYGSlhzFnOcB1RwzpmppIWjQVqCbWSP7iqMDPRPGSTp4KzRMuX+l11SKV2rdBDsLDXbgX9Q2dLMoCoOsrrljO4h33EHQdL7Thw7onbNPK0o+0W4HE1HYd/R45l/Kd8CTUkiXuaEFmsYkSp7wbBlkKVnMITgyh0P9shoE7fOEvDdQSwcI8/QBnZQBAADPBAAAUEsDBBQACAAIADYRTDkAAAAAAAAAAAAAAAAZAAAAcmVwb3J0cy9Gb2xkZXJfMy1tZXRhLnhtbLOxr8jNUShLLSrOzM+zVTLUM1BSSM1Lzk.....

--- result of decoding --
......reports/Folder_3/NeedCareAccount.report・T]kテ }マッ(y_枻 cX??エ飃フ`OE醐Д?~?O聴ヘセX怜)sッGッWxソ+驚?#?菶テ?熬ゥ\ネマネ葢ヨソG Lx・エ 8ア4c?レ?- ....

Thanks in advnace
Hi, does anyone can retrieve dashboard component with meta data api 14.0? (prelease env)

When I tried it, salesforce retursn data bellow only against my will. (I wanted to get dashboard component..).
Does someone know why this is happening..?

****************** response soap from salesforce **************
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="http://soap.sforce.com/2006/04/metadata">
    <soapenv:Body>
        <listMetadataResponse>
            <result>
                <createdById>005t0000000tVaNAAU</createdById>
                <createdByName>Dai Odahara</createdByName>
                <createdDate>2008-09-11T08:52:35.000Z</createdDate>
                <fileName>
                    dashboards/dashboards/CompanyDashboards.CompanyPerformanceDashboard/AdoptionDashboard.dashboard
                </fileName>
                <fullName>
                    dashboards/CompanyDashboards.CompanyPerformanceDashboard/AdoptionDashboard
                </fullName>
                <id>01Zt0000000DqdsEAC</id>
                <lastModifiedById>005t0000000tVaNAAU</lastModifiedById>
                <lastModifiedByName>Dai Odahara</lastModifiedByName>
                <lastModifiedDate>
                    2008-09-11T08:52:35.000Z
                </lastModifiedDate>
                <type>Dashboard</type>
            </result>
            <result>
                <createdById>005t0000000tVaNAAU</createdById>
                <createdByName>Dai Odahara</createdByName>
                <createdDate>2008-09-11T08:52:35.000Z</createdDate>
                <fileName>
                    dashboards/dashboards/CompanyDashboards.CompanyPerformanceDashboard/CompanyPerformanceDashboard.dashboard
                </fileName>
                <fullName>
                    dashboards/CompanyDashboards.CompanyPerformanceDashboard/CompanyPerformanceDashboard
                </fullName>
                <id>01Zt0000000DqdtEAC</id>
                <lastModifiedById>005t0000000tVaNAAU</lastModifiedById>
                <lastModifiedByName>Dai Odahara</lastModifiedByName>
                <lastModifiedDate>
                    2008-09-11T08:52:35.000Z
                </lastModifiedDate>
                <type>Dashboard</type>
            </result>
        </listMetadataResponse>
    </soapenv:Body>
</soapenv:Envelope>
Hello, guys. Does anyone succeed in hitting metadata api like create method?
Now I'm trying it but an error saying "INVALID_SESSIN_ID" occurs.

I'm doing like below with java client, but it does not work.
---
Calls login() which is part of the enterprise WSDL and, if the login succeeds:
  • Sets the returned sessionId into the session header for the metadata SOAP binding. This is required for session authentication on subsequent metadata API calls.
  • Resets the endpoint to the returned metadataServerUrl, which is the target of subsequent metadata API calls.

    All client applications that access the metadata API must complete the tasks in this step before attempting any subsequent metadata API calls.

---

does someone have any hint..? my soap message is the followings.

--

<v:Envelope xmlns:i="http://soap.sforce.com/2006/04/metadata"
    xmlns:d="http://www.w3.org/2001/XMLSchema"
    xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:t="http://soap.sforce.com/2006/04/metadata">
    <v:Header>
        <v:SessionHeader n0:mustUnderstand="0"
            n1:ns1="http://soap.sforce.com/2006/04/metadata" xmlns:n0="soapenv"
            xmlns:n1="xmlns">
            <v:sessionId n2:type="xsd:string" xmlns:n2="xsi">
           xxxxx(session id)
            </v:sessionId>
        </v:SessionHeader>
    </v:Header>
    <v:Body>
        <t:create id="o0" c:root="1">
            <metadata n3:type="t:metadata"
                xmlns:n3="http://www.w3.org/2001/XMLSchema-instance">
                <fullName n3:type="d:string">
                    Event.ByMetaDataAPI__c
                </fullName>
                <label n3:type="d:string">ByMetaDataAPI</label>
                <length n3:type="d:int">100</length>
                <type n3:type="d:string">Text</type>
            </metadata>
        </t:create>
    </v:Body>
</v:Envelope>
--

thank you very much,

Ciao, guys. I'm thinking that I'd start Android open-source project focusing on Salesforce using Apex API. Android is based on Java application, so I've writing my app in Java JDK6.

I succeeded in connecting to salesforce thru SOAP base web serivce so far. Now I'm cleaning up my source code and then am ready for starting source code on...google code or so.  I'm writing serveral articles about my salesforce android on http://lg3d.blogspot.com/

When I post my code, I'll add a comment to this thread again so please join in if you're interested in it..

Grazie so much,
Hi, I'm trying to gather all fields of Object. For instance, Name, Id, Tel, WebSite,....of Account.
I know we could do it with Force.com API - describeSObject( Account ), but do you know how to do it with Apex Code?

Please let me know if anyone knows it...

Thank you very much,
Hi, I'm coding visualforce page.

I want to implement picklist item by visualforce but I cant see picklist tag element with visualforce reference guide..

Does anyone know how to code it or Should I write picklist code by javascript in <script> tag??

Thank you very much
Hi, guys.

I'm trying using java applet app in s-control but I can't.
"Null pointer exception" occurs when excuting the java applet :(

My questions are below.
1. where do I upload the class files? to document folder?
2. Is source code correct to describe java applet?

<html>
<applet code="Sample.class" codebase="{!Scontrol.JavaCodebase}" archive="{!Scontrol.JavaCodebase}{!Scontrol.JavaArchive}"
height="315" height="300">
</applet>
</html>

Does anybody know how to do it? Thank you very much in advnace!
please, anybody knowns how to call a method defined in an Apex package, using java API?
thanks
  • February 01, 2007
  • Like
  • 0