shunkosa / sfdx-flowdoc-plugin

A Salesforce CLI plugin that generates design document from Lightning Flow (currently Process Builder) metadata
https://flowdoc.herokuapp.com
65 stars 15 forks source link

Fails with: Cannot convert undefined or null to object #8

Closed pogilvie closed 4 years ago

pogilvie commented 4 years ago
peter: (master):~/Projects/salesforce-> sfdx flowdoc:pdf:generate Asset_Actions -u peter
ERROR running flowdoc:pdf:generate:  Cannot convert undefined or null to object

Works when I tried it out from my home machine to a developer org. Fails on work machine to a sandbox

shunkosa commented 4 years ago

@pogilvie Thank you for reporting the issue! Would it be possible if you could upload the process metadata XML file here? You can retrieve metadata by running sfdx force:source:retrieve -m Flow:YOUR_PROCESS_API_NAME

pogilvie commented 4 years ago

I'm afraid I can't share the XML as it is company private. I did retrieve the process builder xml and did not see anything remarkable in it. Here's some things which might be tricky in it: RecordType <leftValueReference>myVariable_current.RecordType.DeveloperName</leftValueReference> condition login <conditionLogic>3 AND (1 OR 2)</conditionLogic>

is there tracing that I can turn on?

shunkosa commented 4 years ago

All right! Field referencing is expected to display well. Could you please try to set development to SFDX_ENV env variable and see what the console says?

スクリーンショット 2020-04-28 7 01 46
pogilvie commented 4 years ago

Well, I reinstalled sfdx-flowdoc-plugin and re-ran it and it worked! Thank you for looking at this.

shunkosa commented 4 years ago

Oh, great to hear that!