Passing Variables from Model in Skuid Mobile Custom Apex Action

  • 1
  • Problem
  • Updated 3 years ago
  • Acknowledged
I cant seem to find any documentation on this, I am trying to call an Invokable Method that takes in a List of Custom Objects called "Allocations". I want to pass in the Model Rows as the input but I have this screen and I am not sure what goes in this box to accomplish sending the SObjects as a List of rows from the model.



The method I am trying to access looks like this...

@InvocableMethod(label='Send Shared Solar Contract' description='Does something')   
public static void sendShardSolarContract(List<Facility_Allocation__c> allocations) {
 // Does Something
}

Alternatively, how can I edit this XML to end up giving me the same desired effect: (I want a List<Facility_Allocation__c> to get passed but i am not sure of the syntax to do that)

<action type="sfdc-custom-apex" sfdcactionname="SendContractsController">                                       <inputs>
                 <input name="allocations" displaytype="SOBJECT" value="Facility_Allocation__c"/>
           </inputs>
</action>

Thanks.
Photo of Chris Bright

Chris Bright

  • 70 Points
  • frustrated

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I'm not sure you are going to get this done with the decarative tools.  The box for Allocations is expecting a single field value to be passed to it  using skuid's mustache merge syntax.  I think you are going to have to go to Javascript,  build your comma delimited list of values and pass this off to your Apex action.  Sorry. 

(heres a post about building the list - in this case to send a Marketo mass email,  but I think you can work out the differences:  https://community.skuidify.com/skuid/topics/how_to_add_marketo_send_email_mass_action_to_a_skuid_tab...

Cheers.