salesforceapexsalesforce-lightningdeveloper-console

How to execute this three year old code on Salesforce CRM?


I am trying to upload and execute the following three year old code (which was created on someone else's Salesforce developer console). I have the code but the execution/creation of custom objects etc. is confusing me and I cannot figure out how I'm supposed to do it - the guy who was supposed to help isn't responding and I'm on a tight deadline.

I tried uploading the code on dev console on Salesforce but apparently I have to create custom objects??? and it didn't even execute either and I wasn't able to create/access the web app.

Here is the link for the code: https://docs.google.com/document/d/1sTarJgRz5q3kjG2zizJp2n1H2X9D7XDV/edit?usp=drivesdk&ouid=113751617738626794754&rtpof=true&sd=true


Solution

  • This is a hot mess. It's some questionnaire designed to be publicly available, right?

    You'll need to create a custom object before this compiles, call it Student__c. It'll need at least 1 custom field called Record__c. I don't know what type, maybe Text(255) for a start. Afterwards it should compile (create new class, create new Aura component) but you're not done yet.

    You'll also need the public part. Create a Site or an "Experience" (formerly known as community) called "hub1" so the addresses in it will be similar to https://sch-developer-edition.ap15.force.com/hub1/s/ag2. And... well, we don't know what these ag2, civil pages originally contained, probably some more fluff text about chosen profession? This link is dead now. There were some critical updates in SF world in meantime ("stabilise visualforce urld, enable enchanced domains") so maybe this org is still online just under different address, maybe the org has been deleted and you're screwed. You could try experimenting editing the links a bit to look like a Site you know works but... eh. (I expected https://sch-developer-edition.my.site.com/s, https://stanleystudentcrm-dev-ed.my.site.com/s but either I did it wrong or the Site is down or whole org was deleted)

    Same with https://stanleystudentcrm-dev-ed.lightning.force.com/