• Amar Singh
  • NEWBIE
  • 0 Points
  • Member since 2014


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I am able to create scratch org in DevHub using the following command:
sfdx force:org:create -s -f config/project-scratch-def.json -a "MyScratchOrg".

I logged in to my DevHub org and verfied that a new scratch org record is available under Active Scratch Orgs Tab:

User-added image

However i am not able to open the scratch org:

sfdx force:org:open -u MyScratchOrg
ERROR:  No org configuration found for name MyScratchOrg.

Try this:
Run the "sfdx force:auth" commands with --setdefaultusername to connect to an org and set it as your default org.
Run "force:org:create" with --setdefaultusername to create a scratch org and setit as your default org.
Run "sfdx force:config:set defaultusername=<username>" to set your default username.

I tried the third option with my scratch org username but got the below error:

sfdx force:config:set defaultusername=test-nd1wojndmmid@demo_company.net
=== Failures
NAME             MESSAGE
───────────────  ────────────────────────
────────────────────────────────────────
──────
defaultusername  No org configuration found for name test-nd1wojndmmid@demo_company.net

Here is the  Scratch org username:
User-added image

Any help or suggestion would be highly appreciated!
 
Hello,

I am using Frontdoor.jsp to Log Into Salesforce from one of the the Salesforce Organization(Source) to another Salesforce Organization (Target).

I have created one Connected App in Target Org with web scope.

Connected App

As per the documentation, we can use access_token from an OAuth authentication instead of Session ID.
https://help.salesforce.com/HTViewHelpDoc?id=security_frontdoorjsp.htm&language=en_US

I am unable to redirect to Target Organization with access_token from an OAuth instead of session ID.

targetURL: https://instance.salesforce.com/secur/frontdoor.jsp?sid=access_token&retURL=optional_relative_url_to_open

Thanks!!!
 
Hello,

I am using Frontdoor.jsp to Log Into Salesforce from one of the the Salesforce Organization(Source) to another Salesforce Organization (Target).

I have created one Connected App in Target Org with web scope.

Connected App

As per the documentation, we can use access_token from an OAuth authentication instead of Session ID.
https://help.salesforce.com/HTViewHelpDoc?id=security_frontdoorjsp.htm&language=en_US

I am unable to redirect to Target Organization with access_token from an OAuth instead of session ID.

targetURL: https://instance.salesforce.com/secur/frontdoor.jsp?sid=access_token&retURL=optional_relative_url_to_open

Thanks!!!
 
Logged a ticket with SFDC and they indicate that after the update, if your Process Builder triggers a Flow, that it will error out after updating 12 records.  Is that true?  This sounds like Salesforce doesn't want us to use Flows.

Here is the response from Salesforce: 
Salesforce Support February 1 at 2:01 PM EST
This is to keep it simple:

Consider an auto launched Flow (say Flow1) that takes an AccountId as input variable - Has only one RecordUpdate element in it that updates the Account.Description matching the AccountId with string "Case Created".
Consider a Process (say Process1) on Case object that gets triggered on Case create/edit - with "No criteria—just execute the actions!" and has an immediate action that calls this auto launched flow Flow1 with argument Case.AccountId

Now create 20 cases in bulk - with same accountId as follows
-----------------------------
List<Case> caseList = new List<Case>();

for(Integer i=0;i<20;i++){

Case c = new Case();

c.Status = 'New';

c.AccountId = '0014100000pINGZ';

caseList.add(c);

}

insert caseList;
-----------------------------

When 20 Cases are created, it creates 20 interviews of the Process1. Now each Process creates an interview of Flow1 - So 20 interviews of Flow1 are created and submitted for execution in one transaction and it fails on the 13th one.

Now, this should answer your questions:

1.Can you define what is "duplicated update"? Are we talking about duplicated parent or child Id or something else?
>In above scenario, every case record would update same Account (flow being on Account), so it fails after the 12th case record.

2.What about inner loop? Let's say I have 2 contacts and each has 10 tasks. When I loop through those contacts and update those tasks OUTSIDE the loops after storing them as a collection variables, would I still hit the limit?
>To be precise, in one transaction if the count at one bulk DML action is greater than 12 records it errors out.

3.Hitting the limit means when I have the DML inside the loop or outside the loop or both? If both, does it mean that even though I add all the tasks to be updated in the collection sobject variable and update them at one shot, as long as there are more than 12 tasks needs to be updated, I will hit the limit?
>Irrespective of the DML inside the loop or outside the loop or both or bulk DML from API/ REST or any bulk DML and you add all the tasks to be updated in the collection sobject variable and update them at one shot it fails with count >12.


4.How to determine what is the parents and what is the child in the flow? If I query multiple unrelated objects in the same flow and update them separately within the same flow, would I ever hit the limit?
>This is tricky to answer as it depends if they're all being updated in the same transaction at once.


5.At last, you still haven't tell us how to refactor our flow to avoid hitting the limit if we really have more than 12 tasks in a contact.
>Unfortunately, we do not have any workaround.

 
I am able to create scratch org in DevHub using the following command:
sfdx force:org:create -s -f config/project-scratch-def.json -a "MyScratchOrg".

I logged in to my DevHub org and verfied that a new scratch org record is available under Active Scratch Orgs Tab:

User-added image

However i am not able to open the scratch org:

sfdx force:org:open -u MyScratchOrg
ERROR:  No org configuration found for name MyScratchOrg.

Try this:
Run the "sfdx force:auth" commands with --setdefaultusername to connect to an org and set it as your default org.
Run "force:org:create" with --setdefaultusername to create a scratch org and setit as your default org.
Run "sfdx force:config:set defaultusername=<username>" to set your default username.

I tried the third option with my scratch org username but got the below error:

sfdx force:config:set defaultusername=test-nd1wojndmmid@demo_company.net
=== Failures
NAME             MESSAGE
───────────────  ────────────────────────
────────────────────────────────────────
──────
defaultusername  No org configuration found for name test-nd1wojndmmid@demo_company.net

Here is the  Scratch org username:
User-added image

Any help or suggestion would be highly appreciated!
 
Hello,

I am using Frontdoor.jsp to Log Into Salesforce from one of the the Salesforce Organization(Source) to another Salesforce Organization (Target).

I have created one Connected App in Target Org with web scope.

Connected App

As per the documentation, we can use access_token from an OAuth authentication instead of Session ID.
https://help.salesforce.com/HTViewHelpDoc?id=security_frontdoorjsp.htm&language=en_US

I am unable to redirect to Target Organization with access_token from an OAuth instead of session ID.

targetURL: https://instance.salesforce.com/secur/frontdoor.jsp?sid=access_token&retURL=optional_relative_url_to_open

Thanks!!!
 
Hello.

I'm trying to understand what happened with daily email limit on Developer Edition. About a year ago our team worked on the specific feature which generates hundreds of emails and sends them to internal SF users using SingleEmailMessage and its setTargetObjectId method. I remember that everything worked perfectly on Developer Edition, Sandbox and PRD (we even were able to send some thousands of emails without any problems and limits).

As of now, we're working on another feature which should generate and send many emails too. But we found that SF can't send hundreds of emails now on our Developer Edition.

I've tried to analyze the problem, but didn't find the reason:
- there are no any exceptions in logs;
- when I look at a log it says: "EMAIL_QUEUE" (email is queued);
- I even tried to reserve email capacity using the code like this Messaging.reserveSingleEmailCapacity(numberOfEmails);, but didn't get any exceptions (limit is still free).
Everything works correctly, but emails are not sent to SF users.

So, my questions:
1) is there a specific limit for emails on Developer Edition? If it's true, then what is the daily limit?
2) did I miss something in the SF documentation? I considered this description:
If you use SingleEmailMessage to email your organization’s internal users, specifying the user’s ID in setTargetObjectId means the email doesn’t count toward the daily limit. However, specifying internal users’ email addresseses in setToAddresses means the email does count toward the limit.


I'm providing a test code for those who want to check it on his Developer Edition:
//1) generate and send emails
List<Messaging.SingleEmailMessage> messages = new List<Messaging.SingleEmailMessage>();
final Integer NUMBER_OF_EMAILS = 300;
for (Integer index = 0; index < NUMBER_OF_EMAILS; index++)
{
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
    email.setTargetObjectId(UserInfo.getUserId());
    email.setSubject('Test : ' + index);
    email.setPlainTextBody('test');
    email.saveAsActivity = false;
    messages.add(email);
}
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages, false);

//2) print the results
for (Messaging.SendEmailResult result : results)
{
    System.debug(result);
}