• Chopkins
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

It is my plan to create a custom button that will launch a flow and pass the AccountID through on the query string.  The AccountID will be assigned to a variable called v_AccountIDFull.

 

I then want to display a dynamic choice to the user of all contacts for that account that meet certain criteria.  The list should be sorted.

 

So to get started, I defined a datasource with this script that has the AccountID value hard-coded in it:

 

SELECT Id, LastName,Name from Contact 
WHERE (AccountID='XXXXX' AND CONTACT_TYPE__C INCLUDES ('Support'))
ORDER BY LastName

 

Works wonderfully.  However, I now want to reference my v_AccountIDFull variable in that script.

 

To clarify:

 

1) I cannot use the Choice Lookup filter to do this because I would have to have selected the AccountID from the Contact record in the query above.  If I include the AccountID in the SELECT query above I get no results from the dataset.

2) I cannot just use the standard "select the table with the data" option because if I do that I cannot use the INCLUDES statement above to filter out records that have a specific value in a multi-picklist.

 

  • I select the "Dynamic Script" button.
  • I see the top pane that says "Elements which can be used in your advanced script."  In that list is my v_AccountIDFUll variable.
  • I see the bottom pane which has my Advanced Script with the query above.
  • What is the syntax in the Advanced Script pane to reference the v_AccountIDFull variable value?

Double-clicking the element in the top pane does nothing.  If I change the script to this:

SELECT Id, LastName,Name from Contact 
WHERE (AccountID=v_AccountIDFull AND CONTACT_TYPE__C INCLUDES ('Support'))
ORDER BY LastName

 

I OK that value and then try to hit Next and I get an Advanced Script Validation error:

 

Data source, ds_Contacts Script was provided
None, WHERE (AccountID=v_AccountIDFull AND CONTACT_TYPE__C ^ ERROR at Row:2:Column:17 unexpected token: 'v_AccountIDFUll' (There was a problem executing your command).

 

If I change it to have a colon in front to signify a variable:

 

SELECT Id, LastName,Name from Contact 
WHERE (AccountID=:v_AccountIDFull AND CONTACT_TYPE__C INCLUDES ('Support'))
ORDER BY LastName

 

I get another validation error:

Data source, ds_Contacts Script was provided
None, WHERE (AccountID=v_AccountIDFull AND CONTACT_TYPE__C ^ ERROR at Row:2:Column:17 unexpected token: ':' (Bind variables only allowed in Apex code)  (There was a problem executing your command).

 

If anyone can help me I would really appreciate it....

 

Chopkins 

Hi all,

I'm new to the Desktop Flow Designer and am trying to use a data source element with an advanced script to pull all contacts for a specific account.  I have created a choice lookup then then uses the data source to populate the choices.

Everything works fine if I use the "I will select the table with the data" option for the data source.  Contacts all day long in the choice lookup.

 

However, if I switch over to "I will write an advanced script" I get no results at all in the choice lookup.

Here's what the datasource query looks like:


SELECT AccountID, Id, LastName, Name, Contact_Type__c
FROM Contact
WHERE (AccountID= 'XXXXX')
ORDER BY Name

 

I replace the XXXX with the value of the AccountID which I've verified as correct - just can't get any data.

 

And it is killing me, people.  I need data.  I must have it to survive.

 

Can anyone help?

 

Chopkins

Hi all,

 

I have a multipicklist field called that has 2 possible values:

 

Sales

Support

 

When using Flow and setting up a dynamic choice to pull:

 

AccountId equals {!v_AccountID}  (this works) and

Contact_Type_c contains Support  (this is not working)

 

It works if I set Contact_Type_c EQUALS Support - that pulls any records whose Contact_Type_c multipicklist value is "Support" but the "contains" doesn't find any records.  It doesn't find those that only have "Support" and it doesn't find those that have a value of "Sales; Support".

 

Anyone else have this problem?

 

Chopkins

 

Hi all,

I'm new to the Desktop Flow Designer and am trying to use a data source element with an advanced script to pull all contacts for a specific account.  I have created a choice lookup then then uses the data source to populate the choices.

Everything works fine if I use the "I will select the table with the data" option for the data source.  Contacts all day long in the choice lookup.

 

However, if I switch over to "I will write an advanced script" I get no results at all in the choice lookup.

Here's what the datasource query looks like:


SELECT AccountID, Id, LastName, Name, Contact_Type__c
FROM Contact
WHERE (AccountID= 'XXXXX')
ORDER BY Name

 

I replace the XXXX with the value of the AccountID which I've verified as correct - just can't get any data.

 

And it is killing me, people.  I need data.  I must have it to survive.

 

Can anyone help?

 

Chopkins

Hi all,

 

I have a multipicklist field called that has 2 possible values:

 

Sales

Support

 

When using Flow and setting up a dynamic choice to pull:

 

AccountId equals {!v_AccountID}  (this works) and

Contact_Type_c contains Support  (this is not working)

 

It works if I set Contact_Type_c EQUALS Support - that pulls any records whose Contact_Type_c multipicklist value is "Support" but the "contains" doesn't find any records.  It doesn't find those that only have "Support" and it doesn't find those that have a value of "Sales; Support".

 

Anyone else have this problem?

 

Chopkins

 

I went to this URL.

http://wiki.developerforce.com/page/Force.com_IDE_Installation

 

I downloaded the installer.

>>>Install as Standalone Application > Windows Installer (32-bit)

 

But I met error when I install in my PC.

Error window title : Java Virtual Machine Launcher

Error Message : Invalid or corrupt jarfile

 

My PC Environment:

### JAVA

C:\>java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

 

### OS

Windows XP SP3

 

Can you help me?

Thank you.