• Craig Woodman
  • NEWBIE
  • 15 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 18
    Replies
Ran into this last night in working a flow. I wonder if anyone else has run into it, or if it is a bug with Winter 2022.

A record triggered flow is triggered by a change in a bolean field named "Start Automated Process" to TRUE. Triggers whenever the record is updated and that field's value is TRUE.  The record triggered flow has two elements in it, first, sets bolean Start... field back to False, and then calls a subflow. The subflow's job is to set another field on the task object to a specific value based on computation within the flow (exact function not as important - it has been debugged and is working correctly) - this is done based on passing the $record.id variable to an input variable in the subflow.

When testing by changing the Start Automated Process field on the task object, upon save, the Start Automated Process field goes back to FALSE (as expected) meaning that the record triggered flow is being triggered, but the expected update on the task object does NOT occur.

So I attempted to debug the record triggered field, and this could be crucial, I received an error message saying "Object Task is not supported in UI API."

User-added image
Figuring that this was just for debugging, I was still puzzled that the subflow did NOT appear to be running at all and setting the other value.

To further debug, I set an element in the record triggered flow that will write the value for $Record.Id into an un-used text field on the task record. When I then triggered the flow by setting the Start Automated Process field to TRUE, the SAP field sets to FALSE as expected, but the $Record.id field does NOT set to the value of the record ID.

My conclusion at this point is that the $record.id field is NOT accessible in a record triggered flow. I attempted to assign the $Record.Id field to another declared variable, and had the same result.

I used Process builder to then set the SAP field on Task to false, using the same triggers that I used on the record triggered flow, and to then run the subflow.I set the SAP field on task to TRUE. Process builder launches correctly, setting the SAP field to false, and updated the other field correclty with the subflow called. Clearly, it was able to pass through the Task ID.

I attempted some more debuggiing using the field on task $Record.CallType - and using the record triggered flow, the record triggered flow does not appear to have access to that field either.

Curious if anyone else has run into this?
Hi everyone,

I ran into a strange error in a flow. I have a flow that calls a subflow to return a date 7 business days into the future. 

The parent flow then attempts to compare the 7 day date to a date field on the Opportunity object using a decision element. Pretty straight forward. It runs fine with an internal Salesforce user.

When I put this in a community (running the flow in system mode - Access all records) when I get to the comparison element, I get the following error:

java.lang.ClassCastException: class java.lang.String cannot be cast to class moduleapi.interaction.DateOnly (java.lang.String is in module java.base of loader 'bootstrap'; moduleapi.interaction.DateOnly is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @29d37757)

I used debugging to isolate this to the decision element trying to compare the date field passed back in from the 7 day subflow to a date field on the Opportunity object. System mode allows display of the field in a community. I figure this has something to do with an internal class inside of Salesforce not having access to the Sobject date value from the comunity, even when the flow is in system mode.

The 7 day flow runs successfully in another flow within the community, so it is returning the date correctly. 

The flow that calls the subflow, is yet another subflow, that receives the Opportunity information with a passed in sobject variable. 

2 Workarounds for this:

Create a YYYYMMDD value for the date, using a formula field. This allows greater than/less than comparisons using the number.

Peform a seperate lookup, assigning to a traditional date variable. For some reason, the date variables can be compared, and displayed, passed into flows, all within a community.

Has anyone else run into this? Is there a reason for, or a fix for, not being able to access an Sobject date value in a community?
Hello,

Received an odd error when executing a flow. I was using the "Get Records" element, storing all fields in Salesforce, with the Opportunity Product object. My flow changes the value of the records in a couple of ways, and then writes the value of the changed records back into the database with an update records action.

Note: As part of the processing, the collection from the get records element is assigned to another Sobject variable. That Sobject variable is what gets written back.

The flow worked fine in testing. We put it in production today, and it worked fine with many updates today, until we came to one particular Opportunity. The flow failed with the error mentioned in the title.

All of the fields for this record were not populated with anything odd.

I was updating the records with a Map Collection invokable Apex action. Thinking this must be the trouble, I modified the flow to use a loop, figuring I would deal with governor limits later. I removed all of the invokable Apex. I tested. The same error.

Digging in a bit further, I found that the Fast Update was referencing what looks like all of the fields in the Opportunity Line Item object. In the past, it looks like these reference only the records that are used in the flow. So I thought... Why not use the Lookup element and only assign the fields I need into an Sobject collection variable.

So I did. I also kept running all of the invokable apex. And the flow executed as intended.

I dont' know if this is a problem with the store all records piece of the flow, but I wanted to post here and see what anyone thought. If nothing more, a search I made for this error turned up nothing with flow, so I figure someone might search and find it.

Curious to hear anyone else's thoguhts.
Very similar here to another post that I made about web to lead on before save flow triggers. I was wondering if a before save flow would trigger on an Opportunity record created by lead conversion. I did not see any information, so I figured I would do my own test, by updating the description field on an Opportunity with a before save flow.

Then, I converted a test lead, and sure enough, the description was updated.

This can be a great behavior, but one that everyone needs to be aware of, as it works the opposite of process builder, which will NOT trigger when an Opportunity is created by lead conversion.

Just something to be aware of.
I had a question, but answered it on my own. So since my search didn't reveal anything, I figured I would post it here in case anyone else is looking.

Does a Before Update flow (or one that is triggered by record create or change, that saves before the record is updated) work with lead creation by web-to-lead?

I had not seen this in any documentation. And searches didn't show anything. So I figured I would do some tests on my own.

I set up a test flow to write text to the Lead Description field on creation, that says "The before update flow worked!!!" I then went to the website, downloaded a catalog, and checked the description field. The text was written, with no delay to the web to lead record.

My use case for this is changing the record type automatically on a web to lead record, which passes in certain values. It works perfectly!

I hope that this helps anyone who is looking for this information!
I have run into some situations where a flow screen component will not display with the conditional visibility.  I have found this with using the toggle component (to make a display text component visible) and also with the lowly checkbox.  The components set to conditional visiblity just do not show.  With the checkbox, I had it the affected component show on the first time through the flow, and then didn't on the second.

Any thoughts?
I am working with an Org, and I have used the LeadOrContactID standard field on Campaign Member as a convinient lookup to a campaign member without having to have a decision element to determine which type of ID is being used, and to do a seperate lookup.

I have this on one flow that is around 10 months old, and has been working perfectly.  I needed another flow on Campaign Member yesterday, so I used it again.  I completely tested and it was working fine as of yesterday end of day.

At about 10:30 this morning, I began getting users emailing about errors with records that involved both of these flows that could not save because of an error.  When digging in to it, I found that the Lookup portions of the flow were failing, becasue the flow could not find a Campaign Member record when using the LeadOrContactID as one of the criteria.

So I figured I would create a custom LeadOrContactId field, using a formula field. I verified on the page layout that the field is returning the correct lead or contact ID.  But the flow still fails, for the same reason - It looks like it cannot be used as the criteria for lookup.

I re-crafted both flows with decision elements to take care of this.

Any idea why both flows would quit so suddenly?
Hello,

I ran into an error with a lead converting - just the generic "Salesforce Error" message.  It was not any of my automations failing as I was receiving no application error.  

I tried a few different things, but then I opened a developer console to capture a debug log.  After digging through, I found this error message:

09:04:41:114 EXCEPTION_THROWN [1579]|System.DmlException: Update failed. First exception on row 1 with id 00T2M00003e5MzGUAU; first error: FIELD_INTEGRITY_EXCEPTION, Assigned To ID: id value of incorrect type: 00G2M000003OvngUAC: [OwnerId]

When I went into the task with the ID listed, I noticed that it was owned by a Queue.  Upon changing the two tasks owned by Queues on the lead to a user, the lead was able to convert.

Apparently, we can't convert a lead that has tasks owned by a queue?

Has anyone else run into this?

Craig
I have run into a problem with component visibility using the toggle button feature in flow screen components.  When using the native Salesforce toggle button, I cannot set the visibility components based on the value of the toggle button.

I have established a toggle button titled togShowHide.  I have set a component visibility based on the following:

User-added imageThe problem is, the toggle does not do anything when activated or deactivated to change this component visability - and the visibility is always OFF.

When I reversed everything, making the toggle button active (true) by default, and setting components to display when the value was true, the components will display.  

What it looks like to me, is that the flow components will only allow you to filter the visibility by a variable or other resource that is TRUE.  It just doesn't work with a false value.  In fact, the component won't display at all.

HOWEVER, when I do the same actions using a checkbox, I can filter a flow screen component to display either on a TRUE value or a FALSE value.

Is this a bug, or normal behavior for the toggle component?
Hi everyone,

I opened a case with Salesforce, and they suggested I post it here.  I have a flow that I developed that is used for a visitor log in on an iPad at a kiosk.  The flow asks for name, phone, nature of business, etc, and writes these to a "Visitor Log" object.  My plan is to incorporate with other elements as we go.

I run this flow with an iPad, running the Salesforce 1 mobile app.  I utilize Apple's guided functions, not allowing a click in areas that they don't need to be clicking in the Salesforce 1 app.  All was working well at first, but the flow will stop working after a time period.  Specifically, the flows navigation buttons stop working.  You can still click in the screen and edit, but the navigation buttons stop advancing or going back.

After trying all of the standard things (restart iPad, hard reset, etc.), as
I was using a custom flow screen component for navigation buttons, so I figured maybe that was the issue.  I removed the FSC, and went back to standard navigation buttons.  The issue persists.  It is usually after several hours, and makes it unusable for the purpose.

I solved the problem by removing all lightning components from the flow (ugh... visually bad!) and distributed the flow inside of a visual force page, and through a salesforce site.  No problems at all.  The flow continues to function even after several weeks.  I am still using the Guided functions on the ipad to prevent navigation off of the page.

If I could use the lightnging screen components and deliver the flow in lightning run time doing this, I consider the problem solved!  But I can't.  I opened a case with Salesforce, and they said that the issue was with flows, so I needed to post here.  I don't think that it is, because the flow is functioning perfectly inside of the VF page on a Salesforce Site.

Anybody have any ideas on why this could be?
Ran into this last night in working a flow. I wonder if anyone else has run into it, or if it is a bug with Winter 2022.

A record triggered flow is triggered by a change in a bolean field named "Start Automated Process" to TRUE. Triggers whenever the record is updated and that field's value is TRUE.  The record triggered flow has two elements in it, first, sets bolean Start... field back to False, and then calls a subflow. The subflow's job is to set another field on the task object to a specific value based on computation within the flow (exact function not as important - it has been debugged and is working correctly) - this is done based on passing the $record.id variable to an input variable in the subflow.

When testing by changing the Start Automated Process field on the task object, upon save, the Start Automated Process field goes back to FALSE (as expected) meaning that the record triggered flow is being triggered, but the expected update on the task object does NOT occur.

So I attempted to debug the record triggered field, and this could be crucial, I received an error message saying "Object Task is not supported in UI API."

User-added image
Figuring that this was just for debugging, I was still puzzled that the subflow did NOT appear to be running at all and setting the other value.

To further debug, I set an element in the record triggered flow that will write the value for $Record.Id into an un-used text field on the task record. When I then triggered the flow by setting the Start Automated Process field to TRUE, the SAP field sets to FALSE as expected, but the $Record.id field does NOT set to the value of the record ID.

My conclusion at this point is that the $record.id field is NOT accessible in a record triggered flow. I attempted to assign the $Record.Id field to another declared variable, and had the same result.

I used Process builder to then set the SAP field on Task to false, using the same triggers that I used on the record triggered flow, and to then run the subflow.I set the SAP field on task to TRUE. Process builder launches correctly, setting the SAP field to false, and updated the other field correclty with the subflow called. Clearly, it was able to pass through the Task ID.

I attempted some more debuggiing using the field on task $Record.CallType - and using the record triggered flow, the record triggered flow does not appear to have access to that field either.

Curious if anyone else has run into this?
I have created a flow that is set to run in system mode (System context without sharing).
Based on the documentation, this is supposed to ignore all object permissions.

The flow I have built is meant to create a record of an object that certain profiles don't have the create permission for. I assumed that, if I run the flow in system context this wouldn't cause issues for these profiles. But it does. All profiles that don't have create permissions for that object get an error when they launch the flow. When I change the profile it works fine.

To me that sounds like the behavior of the flow is different from what the documentation describes.

Does anybody have an idea on how to handle that? I tried opening a case with SF but it is considered a development case which is not covered by our support package so I was advised to post the question here. 
Very similar here to another post that I made about web to lead on before save flow triggers. I was wondering if a before save flow would trigger on an Opportunity record created by lead conversion. I did not see any information, so I figured I would do my own test, by updating the description field on an Opportunity with a before save flow.

Then, I converted a test lead, and sure enough, the description was updated.

This can be a great behavior, but one that everyone needs to be aware of, as it works the opposite of process builder, which will NOT trigger when an Opportunity is created by lead conversion.

Just something to be aware of.
I had a question, but answered it on my own. So since my search didn't reveal anything, I figured I would post it here in case anyone else is looking.

Does a Before Update flow (or one that is triggered by record create or change, that saves before the record is updated) work with lead creation by web-to-lead?

I had not seen this in any documentation. And searches didn't show anything. So I figured I would do some tests on my own.

I set up a test flow to write text to the Lead Description field on creation, that says "The before update flow worked!!!" I then went to the website, downloaded a catalog, and checked the description field. The text was written, with no delay to the web to lead record.

My use case for this is changing the record type automatically on a web to lead record, which passes in certain values. It works perfectly!

I hope that this helps anyone who is looking for this information!
I have run into some situations where a flow screen component will not display with the conditional visibility.  I have found this with using the toggle component (to make a display text component visible) and also with the lowly checkbox.  The components set to conditional visiblity just do not show.  With the checkbox, I had it the affected component show on the first time through the flow, and then didn't on the second.

Any thoughts?
I am working with an Org, and I have used the LeadOrContactID standard field on Campaign Member as a convinient lookup to a campaign member without having to have a decision element to determine which type of ID is being used, and to do a seperate lookup.

I have this on one flow that is around 10 months old, and has been working perfectly.  I needed another flow on Campaign Member yesterday, so I used it again.  I completely tested and it was working fine as of yesterday end of day.

At about 10:30 this morning, I began getting users emailing about errors with records that involved both of these flows that could not save because of an error.  When digging in to it, I found that the Lookup portions of the flow were failing, becasue the flow could not find a Campaign Member record when using the LeadOrContactID as one of the criteria.

So I figured I would create a custom LeadOrContactId field, using a formula field. I verified on the page layout that the field is returning the correct lead or contact ID.  But the flow still fails, for the same reason - It looks like it cannot be used as the criteria for lookup.

I re-crafted both flows with decision elements to take care of this.

Any idea why both flows would quit so suddenly?
Hello,

I ran into an error with a lead converting - just the generic "Salesforce Error" message.  It was not any of my automations failing as I was receiving no application error.  

I tried a few different things, but then I opened a developer console to capture a debug log.  After digging through, I found this error message:

09:04:41:114 EXCEPTION_THROWN [1579]|System.DmlException: Update failed. First exception on row 1 with id 00T2M00003e5MzGUAU; first error: FIELD_INTEGRITY_EXCEPTION, Assigned To ID: id value of incorrect type: 00G2M000003OvngUAC: [OwnerId]

When I went into the task with the ID listed, I noticed that it was owned by a Queue.  Upon changing the two tasks owned by Queues on the lead to a user, the lead was able to convert.

Apparently, we can't convert a lead that has tasks owned by a queue?

Has anyone else run into this?

Craig
I have run into a problem with component visibility using the toggle button feature in flow screen components.  When using the native Salesforce toggle button, I cannot set the visibility components based on the value of the toggle button.

I have established a toggle button titled togShowHide.  I have set a component visibility based on the following:

User-added imageThe problem is, the toggle does not do anything when activated or deactivated to change this component visability - and the visibility is always OFF.

When I reversed everything, making the toggle button active (true) by default, and setting components to display when the value was true, the components will display.  

What it looks like to me, is that the flow components will only allow you to filter the visibility by a variable or other resource that is TRUE.  It just doesn't work with a false value.  In fact, the component won't display at all.

HOWEVER, when I do the same actions using a checkbox, I can filter a flow screen component to display either on a TRUE value or a FALSE value.

Is this a bug, or normal behavior for the toggle component?
Hi everyone,

I opened a case with Salesforce, and they suggested I post it here.  I have a flow that I developed that is used for a visitor log in on an iPad at a kiosk.  The flow asks for name, phone, nature of business, etc, and writes these to a "Visitor Log" object.  My plan is to incorporate with other elements as we go.

I run this flow with an iPad, running the Salesforce 1 mobile app.  I utilize Apple's guided functions, not allowing a click in areas that they don't need to be clicking in the Salesforce 1 app.  All was working well at first, but the flow will stop working after a time period.  Specifically, the flows navigation buttons stop working.  You can still click in the screen and edit, but the navigation buttons stop advancing or going back.

After trying all of the standard things (restart iPad, hard reset, etc.), as
I was using a custom flow screen component for navigation buttons, so I figured maybe that was the issue.  I removed the FSC, and went back to standard navigation buttons.  The issue persists.  It is usually after several hours, and makes it unusable for the purpose.

I solved the problem by removing all lightning components from the flow (ugh... visually bad!) and distributed the flow inside of a visual force page, and through a salesforce site.  No problems at all.  The flow continues to function even after several weeks.  I am still using the Guided functions on the ipad to prevent navigation off of the page.

If I could use the lightnging screen components and deliver the flow in lightning run time doing this, I consider the problem solved!  But I can't.  I opened a case with Salesforce, and they said that the issue was with flows, so I needed to post here.  I don't think that it is, because the flow is functioning perfectly inside of the VF page on a Salesforce Site.

Anybody have any ideas on why this could be?
Our company currently has Riptide Popup Alerts in our Salesforce Classic org. We are in the process of re-platforming and are being advised that this functionality is not available in Lightning. Is this true, and if it is, is there a solution in place at all for a Lightning org without manually coding the pop-ups?
  • April 05, 2019
  • Like
  • 0