Salesforce Developer Tutorial: How to use Wrapper Classes in Apex to Simplify your Integrations

  Рет қаралды 11,318

Coding With The Force

Coding With The Force

Күн бұрын

Пікірлер: 27
@ignaciomartin3640
@ignaciomartin3640 3 жыл бұрын
really good information , i learned this doing my official first integration some days ago , so i can tell this is really helpful.
@CodingWithTheForce
@CodingWithTheForce 3 жыл бұрын
Thanks man! I’m glad you liked it and I appreciate the feedback!
@danieljeffrey3269
@danieljeffrey3269 3 жыл бұрын
Great video! Well organized and informative! You have a talent for teaching.
@kimberlyholland9280
@kimberlyholland9280 3 жыл бұрын
Yes, I agree with Daniel Jeffrey, you have a talent for teaching. THANK YOU!! & don't change! In past life, I was an OO ABAP developer (yes it is object-oriented..yeah..i know). You are the equivalent of Thomas Jung @SAP! I hope SF scoops you up, if they haven't already!
@slackularo
@slackularo 3 жыл бұрын
Nice work, Matt. This is a great explanation of wrapper class use and an introduction to json2apex.
@CodingWithTheForce
@CodingWithTheForce 3 жыл бұрын
Thank you man I really appreciate it!
@paxhaven5
@paxhaven5 3 жыл бұрын
Good information, Matt! Much appreciated.
@jean-francoiscarrier9319
@jean-francoiscarrier9319 2 жыл бұрын
Perfect video again! I will have to watch the others too! Thanks!!
@GreeveCapricous
@GreeveCapricous 2 жыл бұрын
Nice Class. Makes me feel a little less timid about approaching the integrations via Apex vs middleware
@parvezalam204
@parvezalam204 Жыл бұрын
Thank you for it
@rahulsethi8914
@rahulsethi8914 2 жыл бұрын
Wow man! You really helped me alot!
@ManiMahal-pn4ip
@ManiMahal-pn4ip Жыл бұрын
Thanks Matt for this informative Tutorial. I would like to know if you have made any videos for inbound integrations into salesforce? Thank you.
@PuerinTheHunter
@PuerinTheHunter 3 жыл бұрын
Nice video! Thanks for posting it! @36:30 you said string parsing is enormous overhead. What if I just use String fieldValue = response.getBody().substringBetween( '"fieldName":"', '',' ); to get a single field?? Asssume I just need few fields from the JSON response, that would be a lot faster than using wrapper class and deserializing JSON, wouldn't it?
@CodingWithTheForce
@CodingWithTheForce 3 жыл бұрын
If it's a simple JSON object and you're only getting one or two fields from it, that's ok to do. Much more than that though and you'll start to see the performance degradation start to add up.
@MrBenjo000
@MrBenjo000 Жыл бұрын
My json2apex output file looks different with the JSONParser method included in all methods, and each value includes the {get;set;}, some values include _Z, like "public Integer limit_Z {get;set;} // in json: limit" . This makes sense for my use case as I have system values in the json payload and would need a way to parse through this using JSONParser method. I'm wondering how do I initiate this JSONParser method when generating my wrapper class @CodingWithTheForce? Or if you were to include this in your example above how would you initiate that. I've included a sample of the wrapper class. Thanks very much, your videos have been super useful to develop my understanding of rest integration. public class JSON2Apex { public class Data { public String client_ref {get;set;} public Integer limit_Z {get;set;} // in json: limit public Data(JSONParser parser) { while (parser.nextToken() != System.JSONToken.END_OBJECT) { if (parser.getCurrentToken() == System.JSONToken.FIELD_NAME) { String text = parser.getText(); if (parser.nextToken() != System.JSONToken.VALUE_NULL) { if (text == 'client_ref') { client_ref = parser.getText(); } else if (text == 'limit') { limit_Z = parser.getIntegerValue(); } else { System.debug(LoggingLevel.WARN, 'Data consuming unrecognized property: '+text); consumeObject(parser); } } } } } }
@walkswithcedarandmaddy6672
@walkswithcedarandmaddy6672 2 жыл бұрын
could you possibly do a video explaining these wrapper classes in more detail? I'm having trouble figuring out how to access data that's nested in the wrapper class. it's silly but I'm practicing callouts by making a salesforce pokedex and getting the info from callouts to the pokeapi. I was able to get all the names of the pokemon by using this video. but when I go to the pokemon's individual page there are nested json objects and arrays. I think it would be really helpful if you did a couple of different callouts with nested and varied data. I'm fairly new to apex. parsing json is so much easier in javascript and python, lol.
@walkswithcedarandmaddy6672
@walkswithcedarandmaddy6672 2 жыл бұрын
also, I wanted to add that your videos have been super helpful.
@TK-vt3ep
@TK-vt3ep Жыл бұрын
How to parse html with img from json you have and insert into salesforce object??? Could you please suggest.
@mailme7514
@mailme7514 2 жыл бұрын
Hello could you please do few more sessions on same wrapper class integration topic which is also known as Data transfer object it would be very much helpful.
@shaswat6297
@shaswat6297 2 жыл бұрын
3:30 point of this vdo 4:30 postman or use han 6:55 json etto apex class Han direct
@pavandkbose
@pavandkbose 2 жыл бұрын
Hi ,could you please make a detailed video on Test Class on every aspect??
@CodingWithTheForce
@CodingWithTheForce 2 жыл бұрын
Hey Pavan, yes! It will be a little while but as part of the Intro to Apex tutorial series I'm currently creating I will be creating some videos going over absolutely everything related to test classes! You can follow the playlist here: kzbin.info/aero/PL0wESsiWMBTrCT3kNGIT3HpWLG6SmVr2F
@pavandkbose
@pavandkbose 2 жыл бұрын
@@CodingWithTheForce Sure thanks a lot as I'm from Non- coding background ,I'm finding it difficult to analyse the problem and impliment the right solution..and your videos help me a lot in figuring out the issues.. Hope one day I also become a software developer as you are🙂
@romanregmi1332
@romanregmi1332 Жыл бұрын
You should have picked a more difficult JSON data.
Salesforce Developer Tutorial (Integrations): How to Send POST Requests In Apex
34:24
Salesforce Developer Tutorial: How and When to use Interfaces In Apex
54:18
Coding With The Force
Рет қаралды 6 М.
Worst flight ever
00:55
Adam W
Рет қаралды 7 МЛН
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 126 МЛН
JSON Serialization and Deserialization
43:01
Gyan Easy
Рет қаралды 17 М.
The Ultimate Guide to Writing Classes in Python
25:39
ArjanCodes
Рет қаралды 113 М.
Wrapper Class in Apex Salesforce. Best Example to learn Wrapper Class.
14:12
Khan’s Tech Videos
Рет қаралды 3,9 М.
Salesforce Developer Tutorial - The Complete Guide To Apex Triggers in 2022
2:09:40
How To Build And Structure A Microservice In Golang?!
23:03
Anthony GG
Рет қаралды 51 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 156 М.