You need to sign in to do that
Don't have an account?
Why i can't Find My Custom Object in Lightning App?
Your help is highly appreciated
Fiona

Multiple Developer Edition environments
Thanks,
Dan

The only thing that needs to be different when setting up a second org is the username. You want to register the new dev org using the same email address or another valid one that you can use to activate things like your org and when enabling domains and lightning experience.
You can use this link (https://developer.salesforce.com/signup) (https://developer.salesforce.com/signup) to go and sign up for a new developer org at any time. There is no limit to how many you can have.

access first element in a set
How can I access the first element in a set? Example in a list, you can use this to get the first element in the list
Integer x = xList.get(0);
What would be a quick equivalent way of doing this in a set?



string firstElement = null; for (string setElement : setElements) { firstElement = setElement; break; }
This would be (marginally) faster, since you break early.
You can also:
string firstelement = (new list<string>(setelements) )[0] );
Just make sure setElements.isEmpty() is false.

Apex Test Classes: "Attempt to de-reference a null object" error
System.DmlException: Update failed. First exception on row 0 with id 003M000000Zc1NaIAJ; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, PopulateContactAreaCode: execution of BeforeUpdate
caused by: System.NullPointerException: Attempt to de-reference a null object
Trigger.PopulateContactAreaCode: line 5, column 1: []
Trigger:
trigger PopulateContactAreaCode on Contact (before insert, before update) { for(Contact contact : Trigger.new) { string AreaCode = CountryRegion__c.getInstance(contact.MailingCountry).Area_Code__c; contact.Area_Code__c = AreaCode; } }
test class:
@isTest public class PopulateContactAreaCodeTest { static testMethod void attTriggerTest1() { test.startTest(); Account acct = new Account(id = '001M000000iLhTL', Name = 'Test Account ', Mailing_Country__c = 'Afghanistan'); update acct; Contact con = new Contact(id = '003M000000Zc1Na', LastName = 'Test Contact', Account = acct, Email = 'test@test.com', Mailing_Country__c = 'Afghanistan', MailingCountry = 'Afghanistan'); update con; delete con; test.stopTest(); } }
any idea what I added wrong?
thank you in advance

Because you're running a unit test, it doesn't see any data, and therefore no custom settings exist. You'll need to insert the custom setting before you insert the Contact record. Here's an example:
static testMethod void attTriggerTest1() { insert new CountryRegion__c(Name='Afghanistan',Area_Code__c='123'); test.startTest(); Account acct = new Account(id = '001M000000iLhTL', Name = 'Test Account ', Mailing_Country__c = 'Afghanistan'); update acct; Contact con = new Contact(id = '003M000000Zc1Na', LastName = 'Test Contact', Account = acct, Email = 'test@test.com', Mailing_Country__c = 'Afghanistan', MailingCountry = 'Afghanistan'); update con; delete con; test.stopTest(); }
Parse String Json "_id" to "id" Apex Object
Hi guys,
¿How can I parse a string json with a complex attribute name "_id"?
I'm trying to parse the next json:
[{"_id":"55d66226726b611100aaf741","replacement":false,"quantity":5,"name":"Generator 1000 kW","maintenanceperiod":365,"lifespan":120,"cost":5000,"sku":"100003"},{"_id":"55d66226726b611100aaf742","replacement":true,"quantity":183,"name":"Cooling Fan","maintenanceperiod":0,"lifespan":0,"cost":300,"sku":"100004"}]The Class that I created is:
public class Equipment { public final String id; public final Boolean replacement; public final Integer quantity; public final String name; public final Integer maintenanceperiod; public final Integer lifespan; public final Integer cost; public final Integer sku; public Equipment(String id, Boolean replacement, Integer quantity, String name, Integer maintenanceperiod, Integer lifespan, Integer cost, Integer sku) { this.id = id; this.replacement = replacement; this.quantity = quantity; this.name = name; this.maintenanceperiod = maintenanceperiod; this.lifespan = lifespan; this.cost = cost; this.sku = sku; } }
But I'm having troubles to parse _id from origin string json to Apex code.
System.assertEquals('55d66226726b611100aaf741', equipments.get(0).id);
When I try to get the id, only I can obtain null value.
Thanks for your time.
Best Regards,
Carlos Lozano.

public static List<Equipment> jsonToListEquipment(String stringJson){ String replaced = stringJson.replaceAll('\"_id\"', '\"id\"'); return (List<Equipment>) JSON.deserialize(replaced, List<Equipment>.class); }

Validation Rule on AccountNumber
AND(
ISBLANK(AccountNumber),
NOT(ISNUMBER(AccountNumber)),
LEN(AccountNumber) <> 8
)


Your formula should be:
OR(
ISBLANK(AccountNumber),
NOT(ISNUMBER(AccountNumber)),
LEN(AccountNumber) <> 8
)

How do i find aconnected app by connected_app_id?


Hello Christopher,
you can query the Connected Application so that can see the list of application
use this query below
SELECT Id, Name FROM ConnectedApplication
Mark as Best Answer if it helps.
Thanks,
Mahesh

Custom Buttons not showing in Lightning but shows up in Classic
I recently hid a custom button from Lightning and enabled it back again in the page layouts. But it does not show in Lightning, but works fine in Classic. What should I do it make it visible again?


Thanks for looking into this for me. I checked all the links you sent and that really did not solve the problem. I did find the solution though. It slipped my mind that for Lightning you would add it in the "Salesforce Mobile and Lightning Experience Actions" and for Classic it is in "Custom Buttons".

How is omni-channel routing different from case-assignment rules?
Recently I was going through Trailhead content on omni-channel and various routing mechanisms (skill based, queue based). Following statement from trailhead confuses me : "Omni-Channel always assigns cases to the right support agents, and customers are happy with customer service. ".
If we already have case-assignment rules in place, why do we need omni-channel queue based routing? How are the two things different?



A case assignment rule in Salesforce.com is really a grouping of rules that will help you automatically assign cases throughout your support organization based on criteria captured on the case records. Each assignment rule can have multiple rule entries.
In Omni-Channel, work items are automatically routed or “pushed” to agents who are assigned to the appropriate queue. Incoming work items are routed to the agent with the least amount of open work. When work items all consume 1 capacity, the agent with the lowest number of work items receives incoming work.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks
how to get all the invitees associated to an event?
i need to get the ids of all the contacts associated to an event.
i.e the contacts that we add into the name field.
However,when i query the whoId field,i just get the primary contact id and not all the other assciated contact ids.
can anyone please help?

This should work.
--
May the Force.com be with you!
First you need to create a tab for object, steps are given below :
Go to setup->App Setup->Create->Tabs->Click on New button
Now you are able to add this tab to application, steps are given below :
Go to setup-> App Setup-> Create-> Apps-> Click on your application->click on edit button-> select & add your tab
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh