• Nazim Altinay 6
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I created a simple LWC to be called from Actions and added to the "Salesforce Mobile and Lightning Experience Actions" section in the page layout.  The "Send Mail LWC" action displayed and worked properly when I logged in from a web browser, but not displaying in the Action list in Salesforce Mobile app.

Did I miss any configuration?

Page Layout Config
Page Layout Configuration

Browser Display
Browser


Mobile
User-added image

LWC Component
dispatchIssue.html

<template> </template>

dispatchIssue.js
import { LightningElement, api } from 'lwc';
export default class DispatchIssue extends LightningElement {
    @api invoke() {
        console.log("Hi, I'm an action.");
    }
}


dispatchIssue.js-meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <masterLabel>Dispatch Issue</masterLabel>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordAction</target>
        <target>lightning__RecordPage</target>        
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordAction">
          <actionType>Action</actionType>        
        </targetConfig>
        <targetConfig targets="lightning__RecordPage">
            <supportedFormFactors>
                <supportedFormFactor type="Large" />
                <supportedFormFactor type="Small" />
            </supportedFormFactors>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
Hi,
I have a process builder which calls Apex method (@InvocableMethod) and the apex method calls future callout, this process is failing with the below error. I have the code checking !system.isFuture() but still failing, not able to figure out.
Error element myRule_1_A1 (FlowActionCall).
An Apex error occurred: System.AsyncException: Future method cannot be called from a future or batch method: AddressValidateController.invokeAddressController(List)
Apex Code is below.
global with sharing class AddressValidateController {
    public static boolean isVerified = false;
   
	@InvocableMethod
    global static void validateAddressFromPB(List<Id> recIds){
       
        if(!system.isFuture() && !isVerified){
            integer count = 0;
            List<String> subList = new List<String>();
            for (Id recId:recIds){
                count+=1;
                subList.add(recId);
                if (Math.Mod(count, 100)==0){
                    invokeAddressController(subList);
                    subList=new List<String>();
                }
            }
            invokeAddressController(subList);
            isVerified = true;
        }
    }
    
    
	@future(callout=true)
    global static void invokeAddressController(List<Id> recIds){
        
               Address validation callout code here
    }
}

Please advice..!