• BerndW
  • NEWBIE
  • 0 Points
  • Member since 2004
  • H+W CONSULT GmbH

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi there,
I just have played around with the tooling API (32) and PHP (SOAP not REST).
In general it works well and gives us many more information than just a describe call.
Especially in regards of field level security it is worth to check it out.
While querying field definitions, over the tooling API I found, that for picklists no values are included in the response.
I used two different queries:
"Select Id, DeveloperName, NamespacePrefix, Metadata, TableEnumOrId From CustomField Where TableEnumOrId = 'Opportunity'";
and
"SELECT Id, DurableId, DeveloperName,Metadata,Label,MasterLabel,NamespacePrefix,QualifiedApiName FROM FieldDefinition WHERE ( EntityDefinitionId = 'Opportunity' )";
In both cases my respones object for the picklist fields looked as follows:
[10] => stdClass Object
(
    [Id] => 00N40000001OHOIEA4
    [DeveloperName] => Produkt
    [Metadata] => stdClass Object
    (
         [externalId] => 
         [label] => Produkt
         [picklist] => stdClass Object
         (
             [picklistValues] => Array
             (
                 [0] => stdClass Object
                 (
                     [default] => 
                  )
                  [1] => stdClass Object
                  (
                      [default] => 
                  )
                  [2] => stdClass Object
                  (
                      [default] => 
                  )
                  [3] => stdClass Object
                  (
                      [default] => 
                  )
             )
             [sorted] => 
          )
          [trackFeedHistory] => 
          [trackTrending] => 1
          [type] => Picklist
     )
     [TableEnumOrId] => Opportunity
)
I would have expected to get the Palues for the picklistValues Array.
Does anybody has an idea how to get the falues of picklists over the tooling API?

 
  • December 10, 2014
  • Like
  • 0
I realize this is unsupported currently, but is there any way to create a new template e-mail and have it send immediately from an scontrol? I'm already creating the new e-mail, but currently it just opens into a standard send e-mail window and I can't find any URL parameter to just have it send the e-mail without requiring a second click.

What I'm currently doing:

window.location.href = "/email/author/emailauthor.jsp?retURL=%2F{!Contact_ID}&rtype=003" + "&p2_lkid={!Contact_ID}&new_template=1&nosave=0&template_id=";

I could of course handle this outside an scontrol with an external web server and a custom link, but I'd prefer to handle everything within an scontrol to keep it contained within SFDC.

Is there any way to do what I want (supported or not) or am I stuck with manual intervention or an external solution?

BTW, adding &save=1 to that URL causes an internal server error, not sure if save=1 is supposed to work and is just currently broken or is just an unexpected URL parameter for this page that causes an error.

Thanks,
E.J.
  • January 31, 2006
  • Like
  • 0