Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDEMPIERE-5135 : Add a link in a Broadcast message to open a record #1105

Merged
merged 2 commits into from Jan 5, 2022

Conversation

nmicoud
Copy link
Contributor

@nmicoud nmicoud commented Jan 3, 2022

Credits go to devcoffee - sorry i didn't find Matheus Marcelino's github account

Co-Authored-By: muriloht 5605206+muriloht@users.noreply.github.com

Credits go to devcoffee - sorry i didn't find Matheus Marcelino's github account

Co-Authored-By: muriloht <5605206+muriloht@users.noreply.github.com>
@nmicoud
Copy link
Contributor Author

nmicoud commented Jan 3, 2022

I've added a getUrlZoom method in MBroadcastMessage so it can be used by processes when you create the broadcast message.
eg:

String message = "bla bla bla";

MBroadcastMessage bm = new MBroadcastMessage(getCtx(), bmID, get_TrxName());
bm.setBroadcastType(MBroadcastMessage.BROADCASTTYPE_Login);
bm.setBroadcastFrequency(MBroadcastMessage.BROADCASTFREQUENCY_UntilAcknowledge);
bm.setTarget(MBroadcastMessage.TARGET_User);
bm.setAD_User_ID(recipients.get(0));
bm.setBroadcastMessage(subject + "
" + message + "
" + bm.getUrlZoom(, "85d25fa6-72c3-4a85-9f6f-1f507851b272", "click here"));

bm.saveEx();

@hengsin
Copy link
Collaborator

hengsin commented Jan 4, 2022

Hi @nmicoud ,

Example of usage should be added to the ticket instead of to the PR.

Regards,
Low

Env.setContext(Env.getCtx(), MBroadcastMessage.CLIENTINFO_BROADCAST_COMPONENT_ID, pnlHead.getUuid());
textMsgContent.setContent(mbMessages.get(0).get_Translation(MBroadcastMessage.COLUMNNAME_BroadcastMessage));
pnlHead.addEventListener(ZoomEvent.EVENT_NAME, this);
htmlDiv.setFocus(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this added block should replace "textMsgContent.setContent(mbMessages.get(0).get_Translation(MBroadcastMessage.COLUMNNAME_BroadcastMessage));" at line 117.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@hengsin hengsin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@hengsin hengsin merged commit 79763f8 into idempiere:master Jan 5, 2022
CarlosRuiz-globalqss pushed a commit that referenced this pull request Jan 16, 2022
…1105)

* IDEMPIERE-5135 : Add a link in a Broadcast message to open a record

Credits go to devcoffee - sorry i didn't find Matheus Marcelino's github account

Co-Authored-By: muriloht <5605206+muriloht@users.noreply.github.com>

* IDEMPIERE-5135 : Add a link in a Broadcast message to open a record

fix suggested by hengsin

Co-authored-by: muriloht <5605206+muriloht@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants