Lightning-Flow-Scanner / lightning-flow-scanner-core

A rule engine capable of conducting static analysis on the metadata associated with Salesforce Lightning Flows, Process Builders, and Workflows.
https://www.npmjs.com/package/lightning-flow-scanner-core
MIT License
27 stars 9 forks source link

New Rule: check if recordId is saved as record and not as String #31

Open fkramer690 opened 1 year ago

fkramer690 commented 1 year ago

Since some releases, it is possible to pass the recordId as record to a screenflow by record page or quick action. This saves you one DML operation and you can directly access the whole record. So it would be helpful to check the flows based on this setting. I assume it is an easy one for you to check if the flow contains and return true/false

<variables>
        <name>recordId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>false</isOutput>
    </variables>
RubenHalman commented 1 year ago

It might just be the time rn, but I am not wrapping my head around this one yet. I will return with a question probably later!

fkramer690 commented 1 year ago

What can I do for you? Is this article helpful? https://salesforcetime.com/2021/10/20/using-an-action-to-pass-the-entire-record-to-a-flow/

RubenHalman commented 7 months ago

@fkramer690 I just realize I totally misunderstood this and now see you can use a record as starting point, sorry!! Would this rule be only to visual flows?

fkramer690 commented 6 months ago

@RubenHalman auto launched flows would also work but not record triggered flows