• jesuis moimeme
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
As formula writing varies from feature to feature, I am struggling to convert multiple picklist field values into text to include as part of a Source Code concatenation process for Campaign Direct Mail assets. Can someone provide an example of how to concatenate fields of multiple data types as a single string when creating a New Resource to populate a field as a result of a decision point?

To be clear, I am trying to concatenate fields of the exact data types listed below:

TEXT+NUMBER+Picklist+Picklist+Picklist+Picklist

Here is what I have attempted so far:
{!$Record.Segment_Code__c}&{!$Record.Initiative__c}&TEXT({!$Record.Package__c})&TEXT({!$Record.RFM_Recency__c})&TEXT({!$Record.RFM_Frequency__c})&TEXT({!$Record.RFM_Monetary__c})

I followed this tutorial, http://www.wadewegner.com/2013/03/creating-anonymous-rest-apis-with-salesforce-com/ , to create a public rest service in a developer sandbox. If I run any of the following:

curl GET http://sitedomainname.cs1.force.com/services/apexrest/Widgets/
curl POST http://sitedomainname.cs1.force.com/services/apexrest/Widgets/
curl PUT http://sitedomainname.cs1.force.com/services/apexrest/Widgets/
curl DELETE http://sitedomainname.cs1.force.com/services/apexrest/Widgets/

I get an HTTP 301 response.

But strangely, if I run that URL through POSTMAN, any request calls my GET method. And if I run it through SOAP UI, it calls my POST and GET methods correctly.

Finally, if I call the same url, but HTTPS, I get a HTTP 503 error.

Here is my class:
 
@RestResource(urlMapping='/Widgets/*')
global class WidgetController {

    @HttpGet
    global static String getWidgets() {
        return 'GET';
    }

    @HttpPost 
    global static String createNewWidget() {
        return 'POST';
    }

    @HttpDelete
    global static String deleteWidgetById() {
        return 'DELETE';
    }

    @HttpPut
    global static String updateWidget() {
        return 'PUT';
    }
}



I should also add that all of these methods work correctly when authenticated through workbench