Andy in the Cloud

From BBC Basic to Force.com and beyond…

5 thoughts on “Automating the Creation of Flow Screens with Apex Metadata API

  1. Andy,

    These posts are very inspiring and get the creative juices flowing. What do you think about automating the creation of wizards? For example, one enters an account on step 1, one or more opportunities on step 2, and one or more opportunity lines on step 3. How about a flow that creates flows, since flows can call apex, and that are styled some how so they can be used by staff and through sites for customers?

    Code generation like this is one of my favorite things to implement and the possibilities it allows. Thanks for the great work and keep it coming!

    • Yep all great ideas! And I totally agree, “extending” the platform with declarative solution building tools is an awesome way to go!

  2. Pingback: Automating the Creation of Flow Screens with Apex Metadata API | SutoCom Solutions

  3. Hi Andrew, first thanks for the toolkit, it’s awesome. I’m having problems getting a read result form the tool kit when querying for flows though (raised an issue on GitHub) for this https://github.com/financialforcedev/apex-mdapi/issues/162

    I get the list and then after making a list query I use the fullName attribute returned to query for the details of a specific flow. I’m only seeing an empty object. Really strange. I guess I’m doing something wrong, or the response map isn’t correct?

    String[] flowFullNames = new String []{‘Sample_loc’};
    flows = (MetadataService.Flow[]) service.readMetadata(‘Flow’, new List(flowFullNames)).getRecords();

    Result is a returned MetadataService.Flow of one item, except that every attribute is null ! (Note that there is an active flow matching this full name, and that I had to remove the version number to get the metadata api to respond, appending the version number caused an exception, I’ve raised another issue in github for that but it’s less urgent).

    What do you think?

    Thanks!

    Matt

    • Sorry for the late reply, work and life a bit busy at present. This usually happens if the flow name is wrong. It doesn’t give an error just an empty single item. Not ideal I agree. Have you confirmed the flow names via Salesforce Workbench?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s