#custom file upload in lwc
Explore tagged Tumblr posts
Text
Enabling CSV data uploads via a Salesforce Screen Flow
This is a tutorial for how to build a Salesforce Screen Flow that leverages this CSV to records lightning web component to facilitate importing data from another system via an export-import process.
My colleague Molly Mangan developed the plan for deploying this to handle nonprofit organization CRM import operations, and she delegated a client buildout to me. I’ve built a few iterations since.
I prefer utilizing a custom object as the import target for this Flow. You can choose to upload data to any standard or custom object, but an important caveat with the upload LWC component is that the column headers in the uploaded CSV file have to match the API names of corresponding fields on the object. Using a custom object enables creating field names that exactly match what comes out of the upstream system. My goal is to enable a user process that requires zero edits, just simply download a file from one system and upload it to another.
The logic can be as sophisticated as you need. The following is a relatively simple example built to transfer data from Memberpress to Salesforce. It enables users to upload a list that the Flow then parses to find or create matching contacts.
Flow walkthrough
To build this Flow, you have to first install the UnofficialSF package and build your custom object.
The Welcome screen greets users with a simple interface inviting them to upload a file or view instructions.
Toggling on the instructions exposes a text block with a screenshot that illustrates where to click in Memberpress to download the member file.
Note that the LWC component’s Auto Navigate Next option utilizes a Constant called Var_True, which is set to the Boolean value True. It’s a known issue that just typing in “True” doesn’t work here. With this setting enabled, a user is automatically advanced to the next screen upon uploading their file.
On the screen following the file upload, a Data Table component shows a preview of up to 1,500 records from the uploaded CSV file. After the user confirms that the data looks right, they click Next to continue.
Before entering the first loop, there’s an Assignment step to set the CountRows variable.
Here’s how the Flow looks so far..
With the CSV data now uploaded and confirmed, it’s time to start looping through the rows.
Because I’ve learned that a CSV file can sometimes unintentionally include some problematic blank rows, the first step after starting the loop is to check for a blank value in a required field. If username is null then the row is blank and it skips to the next row.
The next step is another decision which implements a neat trick that Molly devised. Each of our CSV rows will need to query the database and might need to write to the database, but the SOQL 100 governor limit seriously constrains how many can be processed at one time. Adding a pause to the Flow by displaying another screen to the user causes the transaction in progress to get committed and governor limits are reset. There’s a downside that your user will need to click Next to continue every 20 or 50 or so rows. It’s better than needing to instruct them to limit their upload size to no more than that number.
With those first two checks done, the Flow queries the Memberpress object looking for a matching User ID. If a match is found, the record has been uploaded before. The only possible change we’re worried about for existing records is the Memberships field, so that field gets updated on the record in the database. The Count_UsersFound variable is also incremented.
On the other side of the decision, if no Memberpress User record match is found then we go down the path of creating a new record, which starts with determining if there’s an existing Contact. A simple match on email address is queried, and Contact duplicate detection rules have been set to only Report (not Alert). If Alert is enabled and a duplicate matching rule gets triggered, then the Screen Flow will hit an error and stop.
If an existing Contact is found, then that Contact ID is written to the Related Contact field on the Memberpress User record and the Count_ContactsFound variable is incremented. If no Contact is found, then the Contact_Individual record variable is used to stage a new Contact record and the Count_ContactsNotFound variable is incremented.
Contact_Individual is then added to the Contact_Collection record collection variable, the current Memberpress User record in the loop is added to the User_Collection record collection variable, and the Count_Processed variable is incremented.
After the last uploaded row in the loop finishes, then the Flow is closed out by writing Contact_Collection and User_Collection to the database. Queueing up individuals into collections in this manner causes Salesforce to bulkify the write operations which helps avoid hitting governor limits. When the Flow is done, a success screen with some statistics is displayed.
The entire Flow looks like this:
Flow variables
Interval_value determines the number of rows to process before pausing and prompting the user to click next to continue.
Interval_minus1 is Interval_value minus one.
MOD_Interval is the MOD function applied to Count_Processed and Interval_value.
The Count_Processed variable is set to start at -1.
Supporting Flows
Sometimes one Flow just isn’t enough. In this case there are three additional record triggered Flows configured on the Memberpress User object to supplement Screen Flow data import operations.
One triggers on new Memberpress User records only when the Related Contact field is blank. A limitation of the way the Screen Flow batches new records into collections before writing them to the database is that there’s no way to link a new contact to a new Memberpress User. So instead when a new Memberpress User record is created with no Related Contact set, this Flow kicks in to find the Contact by matching email address. This Flow’s trigger order is set to 10 so that it runs first.
The next one triggers on any new Memberpress User record, reaching out to update the registration date and membership level fields on the Related Contact record
The last one triggers on updated Memberpress User records only when the memberships field has changed, reaching out to update the membership level field on the Related Contact record
0 notes
Text
Custom File Uploader using Lightning Web Component
[Blogged] - Custom File Uploader using Lightning Web Component via @sfdc_panther Link - @Salesforce @SalesforceDevs @Trailhead @ApexHours #Salesforce #LightningComponent #Trailhead
Hi #Ohana, In this blog post, we will talk about how to develop a custom file Upload using Lightning Web Component. We will create a Component that will upload the file under the file object instead of Attachment. The reason we are doing, Salesforce is deprecating the attachments. We will use FileReader class of JavaScript to read the File and then send that to Salesforce. We have designed…
View On WordPress
#custom file upload in lwc#custom file upload using lwc#Custom File Uploader using Lightning Web Component#file uploader using lwc#files in lwc#upload files using lightning web component
0 notes
Text
9/2/2019 - 5/25/2020: QuixolMC Changelog #28
My, my, it’s been ages since our last changelog. Where has the time gone?
Truth is, this post should have been uploaded a looooooooooooong time ago. Sadly, many of the staff of Quixol have been on an extended hiatus- leaving us with nobody left to type up these changelog posts for us, let alone work on new things... Read more on this here.
With the long hiatus behind us, there’s still some loose ends from our update to minecraft 1.14.4 that need tying up... such as releasing this post so you all know everything that was actually changed. Yeah, it’s pretty bad that we let it simmer for that long, but hopefully you’ve all gotten the hang of things without it.
With this changelog, we’d like to issue a special reminder that every “change” listed here is not necessarily something that happened recently- they can often be weeks, if not months old. After categorizing the changes into some main groups, we order them by chronological order, and provide a date as well so you can be sure of when a change was made. Hopefully this helps you get an idea of what you’ve missed, or if a certain “change” you just now noticed has actually been around for a while.
It should also be mentioned that the vast majority of the changes in this changelog are things that were changed in the huge 1.14.4 update we did.
For example, we released the sprawling new Chroma Park, our new party + games area. We also added some new datapacks, as well as updated our existing ones- you can check out all of the up-to-date info on the custom crafting recipes as well as the mob loot tables here and here.
There are numerous other changes and additions, but that’s what the rest of this post is for! Take a look below if you’d like to know more about all of the changes that have taken place in the past ~8 months (ouch).
-----
Key:
+ Feature added - Feature removed % Feature changed/bug fix ^ Feature updated (usually plugin updates) # Comment (for… comments.)
Notable changes from 9/2/2019 - 5/25/2020:
- Gameplay -
+ [10/01/19] Added new LWC protection flags: HopperIn and HopperOut. Accessible via /lwc flag + [11/12/19] Updated server to Minecraft 1.14.4 % [11/12/19] The spawn limits for “ambient” mobs was reduced from 15 -> 8 # This setting only affects the mob cap of bats % [11/12/19] Shulker boxes dropped on the ground now despawn after 30 minutes instead of the 5 minutes used by all other items # This is to hopefully avoid issues where players break their shulker box and leave it behind without realizing until it despawns + [11/13/19] Factions will now prevent players from interacting with some new 1.14 blocks (barrels, lecterns, blast furnaces, smokers, grindstone, campfires, berry bushes, new potted flowers) on faction land if they are not a part of the faction + [11/13/19] The following blocks can now be locked with lwc: barrel, blast furnace, smoker, lectern. Barrels are locked when placing them by default, similar to chests + [11/13/19] Players can now use the /rtp or /wild command from anywhere they wish in the world. It costs 1000 shells to use and has a cooldown of 24 hours # New players may still use the random teleport button at the spawn’s info center for free % [11/13/19] Changes to Miner job # % Fixed nether bricks mining not giving payment % [11/13/19] Additions/Changes to Builder job # + All new stair types (stone, granite, polished granite, diorite, polished diorite, andesite, polished andesite, smooth sandstone, smooth red sandstone, smooth quartz, mossy cobblestone, mossy stone brick, red nether brick, end stone brick): inc/exp: 1.5 # + All new slab types (stone, granite, polished granite, diorite, polished diorite, andesite, polished andesite, cut sandstone, cut red sandstone, smooth sandstone, smooth red sandstone, smooth quartz, mossy cobblestone, mossy stone brick, end stone brick, red nether brick): inc: 0.8, exp: 1.2 # + All new wall types (stone brick, mossy stone brick, granite, diorite, andesite, sandstone, red sandstone, brick, nether brick, red nether brick, end stone brick, prismarine): inc/exp: 1.5 # % Fixed nether bricks not giving payment # + Barrel: inc: 1.5, exp: 1.0 # + Bell: inc/exp: 1.5 # + Lantern: inc/exp: 0.8 # - Removed payment for redstone lamp % [11/13/19] Additions to Engineer job # + Redstone lamp: inc: 1.0, exp: 2.0 % [11/13/19] Additions/Changes to Farmer job # % Payment for taming ocelot changed to payment for taming Cat # + Breed Cat: inc: 4, exp: 5 # + Break Bamboo: inc/exp: 0.2 # + Place Bamboo: inc/exp: 1.0 # + Collect Berries: inc/exp: 0.5 # + Collect bonemeal from composter: inc/exp: 1.5 % [11/13/19] Additions/Changes to Hunter job # % Payment for taming ocelot changed to payment for taming Cat # - Evoker: inc: 30 -> 25, exp: 50 -> 35 # + Pillager: inc/exp: 15 # + Ravager: inc: 30, exp: 40 % [11/13/19] Additions to Crafter job # + All new stair types (See previous list): inc: 2.5, exp: 3.0 # [11/13/19] Changes to Enchanter job(?) potentially. # All the config options for specific enchantments were removed... idk what this means in practice. Maybe you get paid a flat rate based on material enchanted? + [11/13/19] Silence Mobs 1.0.0 (Datapack) # Available for all players to take advantage of. Simply name a mob "silence me" (with a nametag) to make it completely silent! # Credit: https://vanillatweaks.net/picker/datapacks/ ^ [11/13/19] QuixolMC Datapack -> 1.1 # + Added crafting recipes for all coral blocks. Crafted using 2x2 of coral plants or coral fans. Recipe unlocked when holding coral/coral fans. # + Added universal dyeing crafting recipes! You can re-dye most dyeable blocks/items in the game now. # + Also added un-dyeing certain blocks/items- namely glass, glass panes, and terracotta. Simply use the dyed block/item + an ice block to remove the dye. # # All universal dyeing recipes unlocked when holding either the item in question or a dye. # + Added new crafting recipe for black dye. Can now be crafted from 3 charcoal + 1 flint. Unlocked when picking up charcoal # + Added new crafting recipe for un-crafting quartz blocks back into quartz items. Unlocked when picking up quartz block # - Removed crafting recipe for totem of undying. Reasoning: item is much more readily available now due to the introduction of village raids # + Added a new advancement for picking up a spawner. I don't remember making this? # Credit for coral block crafting & universal dyeing: https://vanillatweaks.net/picker/datapacks/ ^ [11/13/19] Mob Heads Datapack -> 1.2 # % Structure of loot table files changed. The "minecraft" namespaced loot tables now make direct calls to "vanilla" namespaced loot tables with the vanilla loot tables inside. # - All "mini" and "head" text removed from item names. The name of the item is now simply the name of the mob, and other identifying text if it is a head of a mob variant. # % Updated skin of Salmon head # + New mob head: Cat. Has 11 variants. 14% head drop, +2% per looting lvl # + Cave Spider: 0.001% -> 0.002% base head drop # - Evoker: 100% -> 14% base head drop, 0% -> 2% per looting lvl # + New mob head: Fox. 1.8% head drop, +0.4% per looting lvl # - Husk: 3% -> 1.25% base head drop, 1% -> 0.25% per looting lvl # - Illusioner: 100% -> 14% base head drop, 0% -> 2% per looting lvl # + Iron Golem: 2% -> 5.5%, 1% -> 1.5% per looting lvl # + New mob head: Panda. 1.8% base head drop, +0.4% per looting lvl # - Phantom: 10% -> 5% base head drop # + New mob head: Pillager. 3.5% base head drop, +0.5% per looting lvl # + Rabbit: 3% -> 5% per looting lvl # + New mob head: Ravager. 14% base head drop, +2% per looting lvl # + Slime: 0.05% -> 0.5% base head drop # - Stray: 5% -> 4% base head drop, 5% -> 2% per looting lvl # + New mob head: Trader Llama. Has 4 variants. 29% base head drop, +7% per looting lvl # - Vex: 10% -> 2% base head drop # + Villager: 0.5% -> 100% base head drop. Now has 15 variants. # - Vindicator: 20% -> 5.5% base head drop, 5% -> 1.5% per looting lvl # + New mob head: Wandering Trader. 100% base head drop # + Witch: +0.1% -> +0.5% per looting lvl # % Zombie Villager: 4% -> 9% base head drop. Now has 15 variants instead of previous 6. # Credit for original datapack (w/ some modifications by Vivian): https://vanillatweaks.net/picker/datapacks/ + [11/13/19] Re-added sitting in "chairs". Right click on stair blocks w/ a sign on it to sit. - [11/13/19] Removed ability to /lay. Sadly it was broken in 1.14.4 :( + [11/14/19] Added /playersearch command, a replacement for the /dox and /ddox commands. Can be used by scout players and up % [11/14/19] Namehistory script now handles "legacy players" (players returning after major updates) with more grace and consistency + [11/14/19] Rewrote /aliases command; it is now /alias <user|nick>, and allows you to look up either past usernames or past nicknames of a player % [11/14/19] /playersearch will now run /alias user as well as /alias nick ^ [11/14/19] QuantumChat 1.0.0 introduced! # "QuantumChat" is a full re-code of the original qChat script. It took months of work to get it to where it is now! "qchat" is no more, QuantumChat is the new face of Quixol's chat plugin! # The re-code mainly focused on improving performance, cleaning up code, and many QoL improvements. # There were plans to add many more new features with this release, but sadly we simply ran out of time. These new features will have to come later. # Read more about the changes in “Technical / Bug fixes” section ^ [11/15/19] Updated mcMMO to version 2.1.107 # This is a rehauled version of mcMMO, revived from the ashes by its original author! The plugin now has a lot of polish, some new abilities, and plenty of bug fixes. % [11/15/19] mcMMO: Fixed bug of mobs' names appearing as hearts in death messages + [11/15/19] mcMMO messages now make use of hover text frequently- try hovering over the messages in chat! % [11/15/19] Many skills' abilities now unlock after a few levels instead of immediately at level 0 now. # Many, many more changes took place in this version... too many to list! % [11/15/19] mcMMO: Rebalanced mcmmo experience for some skills: # Alchemy: # + Stage 3 potion: 120 -> 180 xp # - Stage 4 potion: 450 -> 400 xp # + Stage 5 potion: 0 -> 60 xp # # Fishing: # - Cod: 800 -> 200 xp # + Tropical Fish: -> 800 -> 10000 xp # + Pufferfish: 800 -> 2400 xp # # Woodcutting: # + Mushroom stems: 80 xp # # Herbalism: # + Berries: 300 xp # + Seagrass: 10 xp # + Kelp: 3 xp # + Coral: literally too many to include in this: https://elixi.re/i/vel9mz5i.png # + Beetroot: 50 xp # - Grass: 10 -> 8 xp # - Tall Grass: 50 -> 30 xp # + Bamboo: 10 xp # + Cornflower: 150 xp # + Lily of the Valley: 150 xp # + Wither rose: 150 xp # # Mining: # + Coral blocks: https://elixi.re/i/gbz8p2c5.png # + Magma block: 30 xp # + Emerald ore: 1000 -> 2400 xp # - End bricks: 200 -> 50 xp # - Endstone: 150 -> 100 xp # - Packed ice: 50 -> 30 xp # + Blue ice: 30 xp # + Quartz ore: 100 -> 150 xp # + Misc new stuff: https://elixi.re/i/2xio0wo9.png # # Taming: # + Llama: 1200 xp # + Parrot: 1100 xp # + Cat: 500 xp # + Fox: 1000 xp # + Panda: 1000 xp # # Combat exp multipliers: # - Enderman: 1 -> 0.5 # + Ender dragon: 0 -> 1.0 # + Wither: 0 -> 1.0 # + Witch: 0 -> 0.1 # - Guardian: 3 -> 1.0 # + Mooshroom: 1 -> 1.2 # + Drowned: 1 # + Dolphin: 1.3 # + Phantom: 4 # + Cat: 1 # + Fox: 1 # + Panda: 1 # + Pillager: 2 # + Ravager: 4 # + Trader llama: 1 # + Wandering trader: 1 % [11/15/19] mcMMO: Changes to ability unlock tiers. # There are too many changes to summarize. # Some of this was modified by us; others is defaults of mcmmo. we tried to keep our old behavior wherever possible, but... % [11/15/19] mcMMO: Even more changes to abilities. # Once again, it's too difficult to summarize them all here. % [11/15/19] Rebalanced Alchemy Potion Unlock Tiers # Potion of Slow Falling: Tier 2 -> 1 # Potion of Haste: Tier 2 -> 3 # Potion of Dullness: Tier 2 -> 3 # Potion of Absorption: Tier 3 -> 4 # Potion of Health Boost: Tier 4 -> 8 # Potion of Hunger: Tier 4 -> 5 # Potion of Saturation: Tier 6 -> 5 # Potion of Blindness: Tier 5 -> 6% Change to Alchemy Ingredients # Potion of Haste: Carrot -> Clock + [11/15/19] QuixolMC Public Beta 1.14.4: Released! % [11/15/19] Updated randomtp sign at the spawn to give any player a one-time use free /rtp command. For new players % [11/21/19] mcMMO: Enabled Diminished Returns again % [11/21/19] mcMMO: Nerfed combat xp from endermen further. 0.5 -> 0.25 % [11/21/19] mcMMO: ability ready message should appear in chat again + [1/30/20] mcMMO: You can now crack Infested Stone Bricks with Block Cracker % [1/30/20] mcMMO: Block Cracker will now correctly crack stone_bricks during Berserk again + [1/30/20] mcMMO: Activating Berserk on a soft block (glass, snow, dirts) will break that material right away instead of only breaking subsequent blocks hit by the player + [1/30/20] mcMMO: Berserk will now break glass and glass pane blocks + [1/30/20] mcMMO: Hitting glass with berserk readied will activate it + [1/30/20] mcMMO: Added Lily_Of_The_Valley to the Bonus Drops list % [1/30/20] mcMMO: Archery's Skill Shot bonus damage is now multiplicative instead of additive (nerfing early game skill shot ranks) % [1/30/20] mcMMO: Sweet Berry Bush's default Herbalism XP is now 50 instead of 300 % [1/30/20] mcMMO: Big changes to fishing loot: # % Finding loot now gives more or less xp, dependent on the rarity of the item fished (prev. always gave 200 xp) # # % Rarities of certain items were changed: # % Lapis Lazuli: common -> uncommon # % Iron Ingot: uncommon -> rare # % Gold Ingot: uncommon -> rare # % Amount of items received changed for a few loot items: # - Diamonds: 5 -> 3 # - Lapis Lazuli: 20 -> 8 # - Iron Ingot: 5 -> 4 # - Gold Ingot: 5 -> 4 # # % Certain items were removed from loot table: # - All hoes (wooden, stone, golden, iron, diamond) # - Blaze rod # - Ghast tear # # % Many new items added to possible loot: # + Stick (2), common # + Tripwire hook, common # + Bowl, common # + Lily pad, common # + Leather, common # + Rotten flesh, common # + String, common # + Bone, common # + Water bottle, common # + Ink sac (8), uncommon # + Nautilus shell, uncommon # + Book, uncommon # + Fishing rod, uncommon # + Name tag, rare # + Wet sponge (8), epic # + Heart of the sea, legendary # # % Certain enchantments can now be obtained on items from fishing loot: # + Curse of Vanishing # + Curse of Binding # + Luck of the Sea # + Lure # + Mending # # - Removed infinity from possible fishing loot enchantments # This is because possibility to fish up mending + infinity bow % [1/30/20] mcMMO: Small tweaks to loot from "shake" ability as well
- Server Builds / Locations -
- [10/01/19] Removed various buttons/signs from the grove, as the minigames there were broken anyway % [11/14/19] Reset most of the chunks in the end! The main end island and some of the surrounding islands were spared, as were a few player builds, but everything else has been reset # With this in mind, please be considerate of other players when exploring or building in the end. You should only need one elytra, and collecting multiple at a time is frowned upon unless you're specifically getting them for players you know who need one and don't have one yet # Also, remember that the materials inside of end cities are all craftable (including shulker shells from the shulkers thanks to our datapack), so you don't need to demolish end cities to get those items! - [11/14/19] Removed the following server warps: adventurehouse, bog, equinox, florida, ravine % [11/14/19] Renamed all warps leading to the world protos as "protos:<warpname>" to differentiate them from warps located in our primary world, ghalea + [11/15/19] Added new warp: /warp ChromaPark, our new party and games area! # Features five distinct zones with their own themes! + [11/15/19] Added updated warp: /warp Minigames, now leads to games lobby in Chroma Park + [11/15/19] Updated version of server minigame: Connect Four at Chroma Park (Sunset Lane) + [11/15/19] Updated version of server minigame: Squishu at Chroma Park (Sunset Lane) + [11/15/19] Updated version of server minigame: Spleef at Chroma Park (Wild West) + [11/15/19] New arena/warzone: Banker Brawls at Chroma Park (Wild West) + [11/15/19] Updated version of server minigame: Slappy Salmon at Chroma Park (Hydro Zone) + [11/15/19] Updated version of server minigame: Sheep Pit at Chroma Park (Verdant Vale) + [11/15/19] New server minigame: Chicken Roulette at Chroma Park (Verdant Vale) + [11/15/19] New server minigame: MushGolf at Chroma Park (Verdant Vale) + [11/15/19] New server minigame: Lava Fishing at Chroma Park (Synth Zone) % [11/15/19] Updated warp signs at Orsus to lead to Chroma Park + the new minigames lobby + [11/18/19] Set up droppers underneath Chroma Park dancefloor to dispense items automatically during parties
- Technical / Bug fixes -
% [10/01/19] Fixed bug where shulker bullets would explode instantly # [10/18/19] Server's hardware and location has changed. % [10/18/19] QuixolMC now runs on a very modern Ryzen CPU with a cpu benchmark score of 20,000+, as well as NVMe SSD storage. (This is a good thing) % [10/18/19] QuixolMC is now hosted in Utah, so players from Europe will have higher ping now. Players in Australia or elsewhere across the pacific may notice slightly improved ping. Players in the Americas may notice slight changes as well. - [10/18/19] Major loss of coreprotect data. All old coreprotect data is gone + [11/12/19] Enabled “per-player mob spawns” setting % [11/12/19] Reverted ��count all mobs for spawning” setting to use vanilla behavior # "Per player mob spawns" means that the mob cap is no longer global; it is now per player. Or, at the very least, determined based on the amount of chunks loaded within your "region" of surrounding chunks (essentially all chunks that are connected together, so it could cover multiple players potentially). This requires more testing! # "All mobs count for mob spawning" means counting even mobs that are not considered "natural" (ie spawner mobs) to the mob cap. By changing to this we are effectively restoring vanilla behavior here. The old system caused some problems and wasn't really worth it in the end. % [11/12/19] Experience orbs now only merge up to a value of 1000 xp % [11/12/19] Chunks are scheduled to unload more frequently now - [11/13/19] Removed the annoying "registered furnace" / "registered brewing stand" messages caused by Jobs plugin % [11/14/19] You are now kicked from your faction after 1000 days of inactivity instead of 365. This is to basically "disable" the feature since it seems a bit buggy currently. % [11/14/19] Fixed bug which prevented players from viewing their own biography if they could not view other players' bios + [11/14/19] /bio age now accepts "minor", "underage", and "adult" in addition to integer arguments # Big list of QuantumChat 1.0.0 changes % [11/14/19] QuantumChat: Fixed issue where if you sent a message in a channel you had previously toggled, it did not use the channel prefix color when un-toggling % [11/14/19] QuantumChat: Improved link handler regex greatly; links in chat should be clickable 98% of the time now % [11/14/19] QuantumChat: Fixed QuantumChat not processing certain pronouns discord users had set % [11/14/19] QuantumChat: Doing "@all" will no longer notify everyone, only "@\everyone" and "@\here" work now % [11/14/19] QuantumChat: If a player who is muted sends a private message to someone, the receiver is now warned that the sender is muted & informed on how to ignore them % [11/14/19] QuantumChat: Fixed inconsistency with /msg formatting from the ordinary chat formatting + [11/14/19] QuantumChat: You can now send sound notifs to someone by "@" mentioning them in a private message % [11/14/19] QuantumChat: quantumMessage() function will now remove any newline characters from incoming messages % [11/14/19] QuantumChat: quantumMessage() function now handles cases where a player attempts to chat in a channel they do not have permission to use % [11/14/19] QuantumChat: Fixed issue where a player's message in the discord channel may not get sent to orchid if the first result of quantumDeliver() is blocked % [11/14/19] QuantumChat: Using "&r" will now reset the color/formatting to the default color of the channel/source you are in instead of always "&f" % [11/14/19] QuantumChat: /qchat command changed to /qc. Still has /qchat as an alias though - [11/14/19] QuantumChat: Removed the blacklist GUI. It was taking up space and basically unused % [11/14/19] QuantumChat: Fixed textual inconsistencies in /qc ignore + [11/14/19] QuantumChat: /ch list was completely rewritten. It now displays whether or not a channel is toggled, as well as current chat channel + [11/14/19] QuantumChat: /ch list will now display if the player currently has private messages toggled off + [11/14/19] QuantumChat: /ch list now displays a message to factionless players informing them they need to be in a faction to use faction channels - [11/14/19] QuantumChat: Removed /ch toggle list, as it is now replaced by /ch list % [11/14/19] QuantumChat: Fixed a mistake that allowed quick messages to be sent to the discord channel while orchid was disabled if someone used an alias for the channel (/ch d, etc.) + [11/14/19] QuantumChat: The console can now send private messages to players through /msg . Just for fun :) % [11/14/19] Changed gamerule spectatorsGenerateChunks to true in all worlds # This is due to a 1.14.4 bug in which this gamerule causes chunks to not even load for spectator players, even if they're pre-existing chunks + [11/14/19] You can now make shops from barrels + [11/14/19] Interacting with shops now makes a sound - [11/15/19] Disabled Orchid (our Discord bot) for now due to being inoperational. # DiscordSRV (Quixibot) now handles minecraft to discord bridge % [12/25/19] Fixed bug where player can become stuck in sneaking mode when changing dimensions % [12/25/19] Fixed bug where block breaking animation did not show for other players % [1/22/20] Fixed a dupe glitch with tnt % [1/22/20] Fixed a dupe glitch with redstone dust % [1/22/20] Fix a client crash relating to invalid color nbt data (banners, sheep, etc) % [1/22/20] Fix bug where items get stuck in mid-air in certain circumstances (most noticeable w/ saplings, apples, sticks falling from decaying leaves) % [1/30/20] mcMMO: Improved behavior for mob health bars % [1/30/20] mcMMO: Mobs will now only reward Dodge XP a certain amount of times % [1/30/20] mcMMO: Fixed dupe bugs % [1/30/20] mcMMO: "tool ready" msg no longer sent to chat % [1/30/20] mcMMO: Superability interaction, ability off, & ability refreshed messages now sent to chat % [1/30/20] mcMMO: Fixed excavation loot unlock levels % [2/11/20] Fixed issue where muted players could not read or send /mail # Could be reverted if abused.
- Plugin / Software Updates -
^ [10/01/19] Updated server .jar: Paper 1.13.2 b643 -> Paper 1.13.2 b648 ^ [10/01/19] LWCX -> 2.2.2-b92 ^ [10/18/19] Updated server .jar: Paper 1.13.2 b648 -> Paper 1.13.2 b651 ^ [11/12/19] Updated server .jar: Paper 1.13.2 b651 -> Paper 1.14.4 b226 - [11/13/19] Removed Bookshelves plugin ^ [11/13/19] PerWorldInventory -> 2.3.1 ^ [11/13/19] AreaShop -> 2.6.0-b299 ^ [11/13/19] CoreProtect -> 2.17.5 ^ [11/13/19] Mineable Spawners -> 2.0.8 + [11/13/19] WildernessTP 2.13 ^ [11/13/19] Jobs -> 4.14.3 ^ [11/13/19] Craftbook 3.10.1-b4538 ^ [11/14/19] DiscordSRV -> 1.18.1 - [11/14/19] Uninstalled RandomTeleport (replaced w/ wildernesstp) ^ [11/14/19] Namehistory -> 4.0.0 # Major rewrite of the codebase occurred in this version, focus on performance, code cleanliness, & utility for other scripts ^ [11/14/19] Biography -> 1.8.0 ^ [11/14/19] Easyalias -> 1.8.2 ^ [11/14/19] Faction Extras -> 1.0.4 ^ [11/14/19] Playtime -> 0.6.1 ^ [11/14/19] Pronouns -> 2.7.3 - [11/14/19] Uninstalled Orchid (for now) ^ [11/14/19] QuantumChat 1.0.0 introduced ^ [11/14/19] QuickShop -> 2.4.7 ^ [11/15/19] mcMMO -> 2.1.107 ^ [12/10/19] ViaVersion -> 2.2.0 + [12/10/19] QuixolMC now supports 1.15 clients! ^ [12/25/19] Paper 1.14.4 b226 -> Paper 1.14.4 b237 ^ [12/25/19] ViaVersion -> 2.2.2 + [12/25/19] QuixolMC now supports 1.15.1 clients! ^ [1/22/20] Paper 1.14.4 b237 -> Paper 1.14.4 b242 ^ [1/22/20] ViaVersion -> 2.2.3 + [1/22/20] QuixolMC now supports 1.15.2 clients! ^ [1/30/20] Paper 1.14.4 b242 -> Paper 1.14.4 b243 ^ [1/30/20] mcMMO -> 2.1.114
List of known bugs/issues:
! New players can sometimes get stuck in the beginning room of the tutorial ! The “mobs” section of the statistics counts how many times you’ve been killed by another player for some reason. It will not show how many times you have killed other players, however ! mcMMO: Sometimes, when you are killed by a mob you recently hurt, the death message just says you were killed by [a bunch of hearts]. (This is rarer since the update, but can still happen) ! mcMMO: You don’t get alchemy exp for making slow falling potions ! mcMMO: mcMMO’s messages, either party messages or about abilities, sometimes send at incorrect times, or even send to incorrect players ! Factions: Certain faction permissions are buggy or not intuitive ! PerWorldInventory: Player inventories saved in 1.11 - 1.12 (in the world Protos) may have shulker box data corrupted. undyed shulker boxes turn into purple shulker boxes, and any items inside shulker boxes may lose all of their NBT data. ! Quickshop: When making a quickshop into a double chest, then breaking it to make two single chests, it still thinks the shop is there, regardless of whether its told to be deleted with commands or manually broken in survival. ! Viaversion: 1.15.2 client may experience “ghost blocks” while mining very quickly, or, more frequently, after explosions occur. This is actually a vanilla bug, but it won’t occur if you’re on the server with a 1.14.4 client. ! Viaversion: Client may crash while typing book. Technically a vanilla bug, but exacerbated by viaversion. See here. ! Viaversion: 1.15.2 client will display all statistics in the “items” and “mobs” sections incorrectly/jumbled. It is an issue on the client-end, the server still tracks player statistics properly
Things to come:
• Update to 1.15.2 • New/updated Chroma Park games • Releasing more custom advancements • Fixing more bugs?
last changelog post (#27)
about changelogs
-----
That about wraps up this changelog- and what a lengthy log it was!
As stated before, most of the changes you saw in this post were a result of the ambitious 1.14.4 update we did in November last year. So, most of this stuff isn’t new by any measure- the most recent change on this list is already 3 months old.
Possibly the most ambitious, and most impressive, of these changes is Chroma Park. It took ~2 months of work from well over a dozen people to make the build you see today! It’s the designated “party area”, as well as home to several hand-crafted minigames that you can play for yourself at any time. Go check it out sometime! /warp ChromaPark
There were numerous other changes made, but one that might pique your interest is the large scale mcMMO update. Last year, mcMMO’s original developer returned from a long hiatus to overhaul the whole plugin- we tried to explain some of what’s changed, but honestly it’s a bit difficult to even summarize. You can take a look at some of the changes in mcMMO’s own “changelog” if you’re curious, however keep in mind that some of the information on this site is either outdated or does not apply to QuixolMC.
We apologize again for taking so long to publish this changelog... It really didn’t need to take as long as it did. But, better late than never, yeah? Hopefully the information is still useful to folks, even if it is “old news”.
We’d give an update on things on our end, but... I’m sure you’ve probably heard enough doom and gloom about hyperinfective viruses as it is. So, instead, we just want to wish you all good health. Things are scary out there, so make sure to stay inside- not just for your own health, but for everybody around you. Quixol will always be here for you!
See you again soon. 💙
4 notes
·
View notes
Link
File Upload in Lightning Web Component(lwc) File Upload in Lightning Web Component(lwc) lightning-file-upload component provides an easy and integrated way for users to upload multiple files. The file uploader includes drag-and-drop functionality and filtering by file types. File uploads are always associated to a record, so the record-id attribute is required. Uploaded files are available in Files Home under the Owned by Me filter and on the record’s Attachments related list that’s on the record detail page. Although all file formats that are supported by Salesforce are allowed, you can restrict the file formats using the accept attribute. lightning-file-upload component inherits styling from file selector in the Lightning Design System. LWC file upload Example fileUploadLWC.html fileUploadLWC.js import { LightningElement, api } from 'lwc'; import {ShowToastEvent} from 'lightning/platformShowToastEvent'; export default class FileUploadLWC extends LightningElement { @api recordId; get acceptedFormats() { return ['.pdf', '.png','.jpg','.jpeg']; } handleUploadFinished(event) { // Get the list of uploaded files const uploadedFiles = event.detail.files; let uploadedFileNames = ''; for(let i = 0; i < uploadedFiles.length; i++) { uploadedFileNames += uploadedFiles[i].name + ', '; } this.dispatchEvent( new ShowToastEvent({ title: 'Success', message: uploadedFiles.length + ' Files uploaded Successfully: ' + uploadedFileNames, variant: 'success', }), ); } } fileUploadLWC.js-meta.xml Now we can add this lwc component on the account detail page. Go to one of account detail record Click Setup (Gear Icon) and select Edit Page. Under Custom Components, find your fileUploadLWC component and drag it on Account page. Click Save and activate. We will get the following output where the user will be able to upload multiple files on the account record. Once the user will click on Done, user will see a success message. File Upload Limits By default, you can upload up to 10 files simultaneously unless your Salesforce admin has changed that limit. The org limit for the number of files simultaneously uploaded is a maximum of 25 files and a minimum of 1 file. The maximum file size you can upload is 2 GB. In Communities, the file size limits and types allowed follow the settings determined by community file moderation. By default, guest users can’t upload files. You can enable the org preference. Allow site guest users to upload files. Usage Considerations This component is not supported in Lightning Out or standalone apps, and displays as a disabled input. Additionally, if the Don’t allow HTML uploads as attachments or document records security setting is enabled for your organization, the file uploader cannot be used to upload files with the following file extensions: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi, .svg. For more details please refer to official link. This example is copied from this official link with small tweaks. The post File Upload in Lightning Web Component(lwc) appeared first on Salesforce Blog.
0 notes
Link
Have you ever wanted to play YouTube videos in Salesforce? I have, and created a YouTube player using Lightning Web Components. As a budding pianist, I built the player to help me learn classical music within a Salesforce app. The app centralizes sheet music, ideal music performances, and practice sessions. Since many great musical performances are readily available on YouTube, I needed a YouTube video player. Furthermore I’ve configured the video player to appear beside the sheet music on a Record page, so I can read the music and play the recording, to memorize best practices. Since these are Lightning web components, you can also embed them in Communities. For example we can have an entire community of like-minded musicians, where members share what they have been practicing and/or performing. This video player use YouTube’s IFrame API, which defines the iframe player with event listeners. If the YouTube ID is invalid, the error listener is especially useful for providing the reason why. In the onPlayerError listener, we show the message in an error toast. You can follow along this blog post to create these components, or head over to the Github repo to install the components. Plus, here’s a video on how to configure the finished components. Enjoy Mozart’s “Eine Kleine Nachtmusik” in the background! In this post, we will create two components to play YouTube videos. Why two, you ask? One is a component designed for Home or App pages. The other is a more advanced wrapper component, for use with Record pages. Let’s get started! Pre-requisites This post assumes you have a Salesforce org and Lightning Web Component developer flow set up. If not, follow the steps in the Quick Start: Lightning Web Components Trailhead project. To test these components you also need a YouTube video ID — it is super easy to find. We also need two scripts in Static Resource to use YouTube’s IFrame API. We use the API to create an iframe player with event listeners. They are at https://github.com/annyhe/youTubePlayer/tree/master/force-app/main/default/staticresources/YouTubeJS. Make sure they’re uploaded and show up as public in your org’s Static Resources tab. All set? Let’s start with the simple component for App and Home pages. This component is also a pre-requisite for the wrapper component. Code walkthrough: basicYouTubePlayer component Let’s start with the metadata file for the simpler basicYouTubePlayer component. This component takes a YouTube video’s ID through the Lightning App Builder, so we set isExposed to true and add a youTubeId property to take user input. We specify the interface for Home and App pages. The finished basicYouTubePlayer.js-meta.xml looks like this. In the basicYouTubePlayer.js file, we declare the youTubeId property as a public property via the @api annotation, the same property defined in the basicYouTubePlayer.js-meta.xml file. We also have a private property called player, which will reference the YouTube iframe player component we create. Where do we create the YouTube iframe player? In the renderedCallback, which is called after the template has been rendered with DOM elements. We load the YouTube scripts from static resource and after they’re loaded, we call the onYouTubeIframeAPIReady method. Notice the onYouTubeIframeAPIReady method manipulates the DOM directly. This is because the YT.player constructor takes in a DOM element, and replaces that element with an iframe element. Within the manipulatable wrapper component, we create a child element for replacement by the iframe. Inside YT.player we attach the error listener named onPlayerError, which gets automatically invoked when the player errs. For onPlayerError, we bind it to this so it can access this component instance, to call the showErrorToast instance method. { this.showErrorToast(error); }); } } onPlayerError(e) { let explanation = ''; if (e.data === 2) { explanation = 'Invalid YouTube ID'; } else if (e.data === 5) { explanation = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.'; } else if (e.data === 100) { explanation = 'The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.'; } else if (e.data === 101 || e.data === 150) { explanation = 'The owner of the requested video does not allow it to be played in embedded players.'; } this.showErrorToast(explanation); } showErrorToast(explanation) { const evt = new ShowToastEvent({ title: 'Error loading YouTube player', message: explanation, variant: 'error' }); this.dispatchEvent(evt); } onYouTubeIframeAPIReady() { const containerElem = this.template.querySelector('.wrapper'); const playerElem = document.createElement('DIV'); playerElem.className = 'player'; containerElem.appendChild(playerElem); this.player = new window.YT.Player(playerElem, { height: '390', width: '100%', videoId: this.youTubeId, events: { onError: this.onPlayerError.bind(this) } }); } } Onto the markup. basicYouTubePlayer.html displays the iframe HTML element only if the youTubeId property is set. Another conditional markup renders an error if youTubeId is not found, since the youTubeId property can be passed in from another component. If the youTubeId property exists, we add an empty div with a class to make it selectable, and lwc:dom="manual" to make it manipulatable with JavaScript. The lwc:dom="manual" ensures when we call appendChild() in the basicYouTubePlayer.js file, the element is manually inserted into the DOM. This is what basicYouTubePlayer looks like on an App page. It looks good and sounds even better! The component you see plays Mozart, referencing this YouTube video. That was fun! Next up, let’s walk through the wrapper component which reuses the basicYouTubePlayer component, for Record page. Code walkthrough: youTubePlayerRecordWrapper component Let’s start with the youTubePlayerRecordWrapper.js-meta.xml file. The admin can set which field in the record holds the YouTube video ID, so we have a fieldName property for that. We also add a target tag since the component is for a Record page. The finished youTubePlayerRecordWrapper.js-meta.xml should look like this. The youTubePlayerRecordWrapper.js file retrieves the field value, given the public properties, which are annotated with @api. Since the component is on a record page we use @objectApiName to get its object API Name. The wire service then uses Lightning Data Service to get the youTubeId and saves the result to the record property. To construct the fields the wire service needs, we use a getter to concatenate the public properties. Finally, we use another getter to parse youTubeId from the wire result. import { LightningElement, api, wire } from 'lwc'; import { getRecord } from 'lightning/uiRecordApi'; export default class YouTubePlayerRecordWrapper extends LightningElement { @api fieldName; @api objectApiName; @api recordId; @wire(getRecord, { recordId: '$recordId', fields: '$fields' }) record; get youTubeId() { return this.record.data ? this.record.data.fields[this.fieldName].value : ''; } get fields() { return [this.objectApiName + '.' + this.fieldName]; } } Onto the markup youTubePlayerRecordWrapper.html. The component displays the child component basicYouTubePlayer if the youTubeId field exists, and passes the youTubeId property to the child component. If the youTubeId field is non-existent or empty, the markup shows an error message. What does the youTubePlayerRecordWrapper component look like on a Record page? Like this. Looking good, Mozart — and the music sounds great! Lessons learned Share, get feedback, improve the component I built the basicYouTubePlayer first, then shared it with Peter Chittum. He mentioned it would be lovely to extend the YouTube component to load videos from record values. Why not? That’s when I learned the next two lessons. Use composition instead of overloading a component I re-doctored the Lightning component to work for all three page types: App, Home, and Record. However the code was confusing to read. Finally at the suggestion of Christophe Coenraets, composition, where a component wraps another one, made more sense: let the wrapper component extract the YouTube video ID from the record and let the child component render the video. The end result is two clean, reusable components. Use Lightning Data Service to fetch data on a Record page There are multiple ways to retrieve a field value, given the record ID. One way is to use Apex with record ID and fieldName. However since the public property objectApiName and getRecord method are readily available, we get the field value using Lightning Data Service. This means less code to maintain, and we save API calls for when it is needed. Takeaways These two Lightning web components are now ready to play YouTube videos in Salesforce orgs! I’ve configured them to play classical music. You can use them for product marketing, training/enablement, corporate messaging…the sky is the limit! For example, you can add marketing videos from customers to the Account page to reference the customer’s latest campaign during sales calls. Since these are Lightning web components, they also work in Salesforce Communities and provide an easy and effective way to share content with customers and partners. For example, you can include how-to videos to drive feature adoption and users can put the video beside the new feature in their org. Try out the components today! Here is the code and installation instructions. Resources YouTube iFrame API Working with Third-Party Libraries in Lightning Web Components Documentation for developing Lightning Web Components on Salesforce Platform Documentation for developing LWC off of the Salesforce platform Trailmix on Trailhead for Lightning Web Components LWC Video Gallery
0 notes