You need to sign in to do that
Don't have an account?
Scott Kimminau
visualforce page action causing collision detection on lightning edit
We have a visualforce page that has an action that basically makes a callout (after the constructor gets the contact record) and updates the contact with an attachment that is an image of the contacts drivers license. The problem is, now that we are moving to lightning, when we try to do an inline edit on the record it causes a collision detection. In console and classic we don't get the issue because lightning first does a page refresh when an inline edit is invoked (triggering the action) while classic does not. Anyone know of a possible alternative to doing to visualforce action or some way to not get the collision detection error?
Thanks!
page:
<apex:page standardController="Contact" extensions="IdentificationImageController" action="{!loadrecord}" >
<apex:form >
<apex:inputHidden value="{!c.External_ID__c}" id="theHiddenInput"/>
</apex:form>
</apex:page>
controller:
public without sharing class IdentificationImageController {
public Contact c { get; private set; }
public IdentificationImageController(ApexPages.StandardController controller) {
if (!test.isRunningTest()) {
controller.addFields(new String[]{
'External_Id__c'
});
}
this.c = (Contact) controller.getRecord();
system.debug(c);
}
public void loadRecord() {
loadDriverIdentity();
}
public void loadDriverIdentity() {
try {
String dlName = c.External_ID__c + 'DL';
String sigName = c.External_ID__c + 'SIG';
.....make api callout and then update Contact info.
}
Thanks!
page:
<apex:page standardController="Contact" extensions="IdentificationImageController" action="{!loadrecord}" >
<apex:form >
<apex:inputHidden value="{!c.External_ID__c}" id="theHiddenInput"/>
</apex:form>
</apex:page>
controller:
public without sharing class IdentificationImageController {
public Contact c { get; private set; }
public IdentificationImageController(ApexPages.StandardController controller) {
if (!test.isRunningTest()) {
controller.addFields(new String[]{
'External_Id__c'
});
}
this.c = (Contact) controller.getRecord();
system.debug(c);
}
public void loadRecord() {
loadDriverIdentity();
}
public void loadDriverIdentity() {
try {
String dlName = c.External_ID__c + 'DL';
String sigName = c.External_ID__c + 'SIG';
.....make api callout and then update Contact info.
}
.. now cannu u try frmo the trigger ?
Becasue in lightning its going to be an in line Edit
Or Override the View and Edit Pages on lightnign ?