• Andrew McNamara 13
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
I would like to create a lookup relationship to a parent object using the parents external id from a before insert/update trigger. I am not receiving an error when I do this, but it is not creating the relationship. I have tested using anonymous apex with a dml and the code works fine. In the example, Tech1_ID__c is the external id of the Property__c object. 
trigger CaseAddressHandler on Case (before insert, before update) {
for(Case c: trigger.new){
  c.Property__r = new Property__c(Tech1_ID__c =c.Property_Id__c); 
  }
}
I want to use lightning:recordeditform in a component in lightning communities to create a case. I need the guest user to be able to either create a person account or match a existing account to retrieve the accountid and the personcontactid. When I insert the accountid into the case and call the submit() method for the recordeditform I'm getting a "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITIY"....which makes sense as the guest user doesn't have access. 
I have privacy issues setting the account owner to the guest user as that would make all guest users have permissions to all accounts. 

How can I use lightning:recordeditform to create a case as a guest user in the community? 

 
I have a requirement to use CMS Connect with Drupal to retreive headers and footers from my drupal site. 
There is a pre-requisite for CMS Connect that Drupal needs to serve HTML fragments. 
At first look, this is not how drupal is structured, but Salesforce does note that drupal is compatible with CMS Connect
Has anyone managed to render HTML fragments from Drupal using CMS Connect? 

I have a custom community self registration that runs the site.createexternaluser(user,accountID, password). 
I also have a Flow that is triggered off insert of a user and a status field on the user account that initiates a verificataion process. 
This flow updates fields on the User record. 
When the flow runs after the createexternaluser is intiated, I get an error:

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Contact, original object: Account

I can't use an @future method for this as the user insert and verification flow must be sequentional as it is a login flow and has user interface implications. 
I find it strange that the createexternaluser is obviously exempt from this Mixed DML validation, but any related context is not. 

Does anyone know how you can update a user record in the same context on the createexternaluser method without using an @future method? 

I would like to create a lookup relationship to a parent object using the parents external id from a before insert/update trigger. I am not receiving an error when I do this, but it is not creating the relationship. I have tested using anonymous apex with a dml and the code works fine. In the example, Tech1_ID__c is the external id of the Property__c object. 
trigger CaseAddressHandler on Case (before insert, before update) {
for(Case c: trigger.new){
  c.Property__r = new Property__c(Tech1_ID__c =c.Property_Id__c); 
  }
}
I want to use lightning:recordeditform in a component in lightning communities to create a case. I need the guest user to be able to either create a person account or match a existing account to retrieve the accountid and the personcontactid. When I insert the accountid into the case and call the submit() method for the recordeditform I'm getting a "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITIY"....which makes sense as the guest user doesn't have access. 
I have privacy issues setting the account owner to the guest user as that would make all guest users have permissions to all accounts. 

How can I use lightning:recordeditform to create a case as a guest user in the community?