Home > Forum > Known bugs > Error when executing Menu button action

Error when executing Menu button action

Hi Folks,
whenever I try to execute [Menu button] action, which should open a hyperlink, I get an error:
"Error in Menu button action Start Counterparty Card.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_WFElementDatails_WFD". The conflict occurred in database "BPS_Content", table "dbo.WFElements", column 'WFD_ID'.
The statement has been terminated."
I have exactly same button configured in other workflow in the same application and it works fine. It is irrelevant what hyperlink I try to open, I also tried to remove the button and action and configure new one from scratch - same story.
In the diagnostic mode I see only the same error message. Looks like an issue with foreign key in the DB, maybe someone encountered similar one?

MVP

Hi Patryk,

are you sure the APPLICATION ID you provided is correct?

I could only see "Counterparty Card" instead of "Counterpart Card|ID|". As shown in the attached picture, the application ID should be part of the link.

Additionally, there was no need for an extra slash ("/") before "db" in my link, but that might be specific to my configuration. It might be worth trying to remove the extra slash if there are still issues, even with the correct application ID.

I hope this helps.

Best regards,
Bjoern

In reply to: Jack

Hi Patryk,
I guess why you have this error. I was able to reproduce it on my environment.

I assume that you have the error in the first step BEFORE saving the element. And in this case, where it works, the element is already saved, right?

Hi Jack,

"I assume that you have the error in the first step BEFORE saving the element."
Yes

"And in this case, where it works, the element is already saved, right?"
Nope, it is a new element too, with no ID assigned by the system yet.

In reply to: Patryk Kornak

Hi Jack,

"I assume that you have the error in the first step BEFORE saving the element."
Yes

"And in this case, where it works, the element is already saved, right?"
Nope, it is a new element too, with no ID assigned by the system yet.

ok. I think I know (and it looks like a bug).
Probably in the case that works you do NOT have any list of items in the first step?
When I turned off the visibility of the list in the first step, the error stopped appearing.


--- EDIT ---
this definitely looks like a BUG in my opinion

as a workaround you can make the start link as an HTML field rather than a button in the top menu.
OR
make an HTML field with a script that will inject a button with a link in the top menu :-)

In reply to: Jack

ok. I think I know (and it looks like a bug).
Probably in the case that works you do NOT have any list of items in the first step?
When I turned off the visibility of the list in the first step, the error stopped appearing.


--- EDIT ---
this definitely looks like a BUG in my opinion

as a workaround you can make the start link as an HTML field rather than a button in the top menu.
OR
make an HTML field with a script that will inject a button with a link in the top menu :-)

"Probably in the case that works you do NOT have any list of items in the first step?"
Nope, I tried https://google.com as a link to eliminate any form related issues.

"as a workaround you can make the start link as an HTML field rather than a button in the top menu."
Yeah, I think it will end up with the http link field. Need to update current 2023 version to the newest one, as am sitting on 2023.1.2.68 still, maybe that will help to solve it.
Thanks.

In reply to: Patryk Kornak

"Probably in the case that works you do NOT have any list of items in the first step?"
Nope, I tried https://google.com as a link to eliminate any form related issues.

"as a workaround you can make the start link as an HTML field rather than a button in the top menu."
Yeah, I think it will end up with the http link field. Need to update current 2023 version to the newest one, as am sitting on 2023.1.2.68 still, maybe that will help to solve it.
Thanks.

"Nope, I tried https://google.com as a link to eliminate any form related issues."
it's a bit strange, because I had exactly the same error as YOU and when I turned off the visibility of the list in the workflow I'm starting from (not the one I'm trying to start), the error stopped showing up and I went to the selected page (also https://google.com :-) )
but I have a little different version, although the error is the same

anyway, a link in an HTML field seems easier ;)

In reply to: Jack

"Nope, I tried https://google.com as a link to eliminate any form related issues."
it's a bit strange, because I had exactly the same error as YOU and when I turned off the visibility of the list in the workflow I'm starting from (not the one I'm trying to start), the error stopped showing up and I went to the selected page (also https://google.com :-) )
but I have a little different version, although the error is the same

anyway, a link in an HTML field seems easier ;)

"it's a bit strange, because I had exactly the same error as YOU and when I turned off the visibility of the list in the workflow I'm starting from (not the one I'm trying to start), the error stopped showing up and I went to the selected page (also https://google.com :-) )"

Apologize - I misunderstood your previous post, was thinking about the target form. Bingo! There is an item list in the workflow I'm kicking the link off from, and when I turned off the visibility of this field, the link button started to work again properly.
People don't use this button that often, that's why I haven't connected the error with adding the item list to this form.

Thanks a lot for your help! Issue is not solved, but at least I know the culprit and can make a workaround.