I'm quit new to the SalesForce.I was handed over a tasking of getting all the details of "All Cases" in salesforce.But I have no idea regarding where to start.So I thought that someone could give me a push with an "API".I would like to have an API for .Net.As I'm working with it.
Related
I have an record type of case which has a lookup to an Opportunity which has lookup to Account. When a query is run with workbench it works fine and I can get the account- however when its run in apex only the Opportunity ID is returned, not the account. I am new to salesforce but this is driving me crazy- the fact that the query tool and the code would return different information is beyond me- any advice would be great!
SELECT RelatedOpportunity__r.Account.Name
FROM Case
from apex:
(Case:{RelatedOpportunity__c=0061k00000B5GqiAAF, Id=5001k00000FwaivAAB})
Everything is queried same way, write your code "normal".
System.debug(myCase) focuses on what's important, what's really on "this" record. It doesn't go "up" via lookups and "down" via subqueries (if you have any). It'd spam the debug logs too much.
(well, not even that. It's not System.debug's fault. It's supposed to emit strings. A case is an object, not a string so a toString() is called on it)
You can System.debug(myCase.RelatedOpportunity__r.Account); and you'll get your name. Or play with System.debug(JSON.serializePretty(myCase));
Even better - try to learn the right way from the start. Checking your code's flow by spamming debugs is passe. There's no true debugging of Apex (you can't attach say interactive debugger like with .NET, can't add breakpoints and pause execution like in JavaScript) but all cool kids use https://trailhead.salesforce.com/en/content/learn/projects/find-and-fix-bugs-with-apex-replay-debugger/apex-replay-debugger-debug-your-code, check it out.
The reason for my question is to see if you can give me an idea (similar or not) or know of any type of software/web app available for the following that I am going to tell you.
The context
My sister works in the healthcare industry and currently manually handles several different spreadsheets (Google sheets) in a way for her customers and incomes.
My idea
He had thought of an online form for income. This form would have, among others, a field for the customer's name that would be automatically filled in from the customer's spreadsheet as it is searched while typing. If it exists, other fields on the form will also be filled in automatically. If it doesn't exist, once the revenue-related data is populated and submitted, a trigger would update the new customer data in the customers spreadsheet so that the next time the form is used, the field customer name can be auto-completed with the updated customers.
My solution
I have tried a lot of online forms and softwares: Jotform, Caspio, Logiforms, Typeform, Gravity Forms, Formsite, Quinta DB, Airtable, Rest.io, Ninox, Podio, Cognito Forms, Matrify, Zoho ... but without full success.
For this purpose, the only ones that fit us are JotForm (it would be semi automatic since it does not automatically link spreadsheets), Caspio (it is perfect but excessively expensive for us, € 200, since the basic plan does not include triggers), Logiforms ( its trial is very limited and we cannot test if it would really work for us)
I tell you all this to ask for your help and to ask you if you know of any other software, web app, solution or even think of another different workaround to forms that I have not thought of and can help us.
Thank you very much for everything and a hug.
I have been developing some things and you know during early prototyping types and tables change quickly... it would be nice to cleanup the old data and start again in certain meshes.
For now I was using the example HTTP server so I deleted data.json; but I forgot the localStorage in the browser also needs to be cleared.
One might suppose you could put(null)
I asked on gitter and got
https://github.com/amark/gun/wiki/delete
except for deletes , lol, our excuse is "It works like your OS, when you delete >something it just gets tossed in the trash/recycle bin. That's all."
better safe than sorry though
if you are trying to "delete" stuff because you messed up while developing >something, follow this three step process: 1) localStorage.clear() in every >browser tab you have up, 2) Crash the server and rm data.json, 3) restart >everything. You should then have a clean slate. Often times while I'm >devleoping something I put localStorage.clear() at the top of my code so I only >have to worry about clearing the server.
Welcome to the gun community! Thanks for asking questions.
Yes, deleting data is most simply done with gun.put(null). Take:
var gun = Gun();
var users = gun.get('users');
users.put({alice: {name: 'alice'}, bob: {name: 'bob'}});
// now let's delete bob
users.path('bob').put(null);
If (as you mentioned in the question) however, you mean "delete data" as in wanting to clear out mistakes while developing your app. You'll want to do what you mentioned: localStorage.clear() in all browsers, crash the all servers and rm data.json.
For other developers, it might be useful to know that gun uses a type of tombstone method. You can't actually delete nodes themselves, they just get de-referenced, kinda like how your OS just moves files into a trash/recycle-bin. This tombstone method is very important in a distributed environment, such that the "delete" operation is replicated to every peer.
Thanks for answering your own question though! As always, if you get lost or need help hop on the https://gitter.im/amark/gun .
SITUATION :
I have an application where i have to issue a gift cupon kind of a thing when the user reaches a certain score say 'x'.
I want to create a coupon with a unique QRcode, at the time the user reaches the score 'x' so that he can download it on his iphone and use it. Once it is used , the cupon should be invalidated. this applies to any user using the application. Meaning a coupon is created once the score is reached and deleted or invalidated once it is used.
ISSUE :
I'm not able to figure out how to create a cupon everytime any user reaches the score. Ofcourse, i did go through a lot of documentations and links like http://www.raywenderlich.com/20734/beginning-passbook-part-1. I also tried using pass-source but the valid account requires you to pay minimum about 8$.
As suggested in raywenderlich tutorials, i can create passes but thats not created through the application.
Also i didn't see any method where we can be notified when a user uses his issued coupon so that we can invalidate it.
Am i missing something here?
"Using" a QR code on a coupon means it is scanned by something else. That something else has to take responsibility to report the activity back to you, so you could then update the pass with an "Expired" flag in your database, re-sign and rebuild the pass, issue the push notification so that it would eventually update on the device. You'd also probably want that scanner-thingie to check with you to see that the code is valid before accepting it. So, yeah, not Apple's problem.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
This isn't really a programming question, more of an ideas question. Bear with me.
My sister gave me a well-used Nokia N95. I don't really need it, but I wanted it to do some programming for it. It supports a few languages, of which I can do Python.
My question is this: what to do with it? If I think about it, it has a lot to offer: i can program the GPS, motion sensor, wireless internet, sound and visual capture; it has a lot of hard disk space, it plays sound and video and so on.
The combinations seem limitless. The way I see it, it is a device that is easily always on me, has access to a huge data repository (the internet, and my personal data in it) and can be aware if I'm sitting at home, at work, or moving about somewhere. It could basically read my google calendar to check if I should be somewhere I'm not -- perhaps give me the bus schedule to get to where I should be. It could check if it's close to my home and therefore my home PC bluetooth/wifi. Maybe grab my recent work documents from my desktop computer, along with the latest Daily Show, for the bus journey to work. It could check my library account to see if any of my books are due, and remind me to take them with me in the morning. Set up an alarm clock based on what shift I have marked in my google calendar.
Basically I have a device that can analyze my movements in time (calendars with my data etc) and space (gps, carrier cell ids). By proxy, it could identify context situations -- I can store my local grocery store gps coordinates or cell mast ids and it could remind me to bring coffee.
Like I said, the possibilities seem limitless, and therefore baffling. Does anyone else have these pseudofantastical yearnings to program something like this? Or any similar ideas? How could this kind of device integrate into -- and help -- your life?
I'm hoping we could do some brainstorming.
"Gotta Leave" - A reminder that figures out the bus time, how far you are from a stop on your bus and shows a countdown till you "Could" leave (green), "Should" Leave (yellow), "Must" leave (orange), and "Gotta Run to get there" (red).
As inputs it needs what bus number you want to ride. You turn it on, it finds you, finds your closest few bus stops, estimates your walking speed at 2/mph and calculates when you need to leave where you are to get to the bus with 5 minutes waiting or less.
You should just pick any one and implement it.
It doesn't matter where you start, more that you actually do start. Don't concentrate on the destination, take a step and see what the journey holds.
Do it for a laugh to start and your expectation will be set right for both when you do find your killer app and when you don't.
"Phone home" - an interface to report home if you send a message to your phone that it is lost / stolen. Must be a silent operation from the phone holder's perspective
Options:
Self destruct mode to save your data from prying eyes
Keep calling with it's location every 10 minutes until an unlock is sent indicating the phone is found.
This is the same problem I face with the android (albeit java instead of python). The potential is paralyzing :)
I'd recommend checking out what libraries have already been written for doing cool stuff on that phone, and then building off of them- It's a system that provides inspiration, direction, and a good head start. For instance, on the android side, I'm fooling around with "zxing", a library that lets you read barcodes via the cellphone's camera. That's it's own sub-universe of possibilities, but at least it gives me a direction to go. "do cool things with information about products physically nearby"
"Late for Work" - Determines if you are not at work, buzzes you with a reminder and preps the phone to call into the sick line. Could be used if you are going to be late as well.
Inputs: Your sick line number. Time you should be at work. Where your home is, where your work is
Optional:
Send a text message
Post to an online in/out board
If you are still at home, sound an alarm
If you are still at home, call in sick, if you are not at home sent a "I'm going to be late" message
Comedy Option:
- If you don't respond to ten alarms, dial 911
To add on to what others have said, come up with some kind of office-GPS (via WiFi maybe? Does it have WiFi?) and tell you when you need to go to a meeting.