• Divaker Singh
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Salesforce consultant
  • Dev

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I have a issue related to deactivate user

I have a field deactivate reason in user object

Deactivate User should be redirect on login in portal according to deactivate reason(new field on user) field

1.If deactivate reason is 'FCRA Renew' than user should be redirect on new screen.

2.if deactivate reason is Standard than standard Deactivated message “You access is disabled. Contact your site administrator”
should be display.

But when I am query on deactivate user than it is not return the deactivate reason value.

I have login button on customer portal and its return the site.login method.

Can we query on deactivate user on login time.


class code:

global class SiteLoginController {
    global String username {get; set;}
    global String password {get; set;}

    global PageReference login() {  
        List<User> lstUser = [Select IsActive, Deactivation_Reason__c from User Where Username=:username  limit 1];
        if(lstUser.size() > 0 ){
           User oUser = lstUser.get(0);
           if(oUser.IsActive == false && oUser.Deactivation_Reason__c.tolowercase().contains('fcra') ){   
             return Site.login(username, password, '/main/deactivateuser');
           }
           else{
             return Site.login(username, password, '/home/home.jsp');
           }
        }
        return Site.login(username, password, '/home/home.jsp');
    }
    
    global SiteLoginController () {}   
}


Thanks
I have faced again and again same problem.When i update new version of the Flow is working but it is temporary solution.Please give any solution to fix this problem.

Encountered unhandled fault when running process Step_1_Applicant_Standard_Intake_Order_Start/30180000000CgcO exception by user/organization: 00D80000000d4q4/{4}

; nested exception is:
    common.exception.ApiQueryException: sObject type 'Flow__Interview__BGC_Order__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.
(There was a problem executing your command.) > RETRIEVE

caused by element : FlowRecordLookup.Lookup_Existing_Order

caused by: ; nested exception is:
    common.exception.ApiQueryException: sObject type 'Flow__Interview__BGC_Order__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.
(There was a problem executing your command.) > RETRIEVE

Salesforce Error ID: 358318327-5925 (579180584)

any help will be appreciable.

Thanks!
Work Phone should be in the following Format  +91-0XX-XXXXXXXX for validation rule how to craete
Use case: develop and deploy a visual force page with lightning components to a force.com site.  The site is used by guest users (anonymous user) only.  We do not have Communities enables in our org.  I have seen some forum posts about this but no definitive answers or documentation references.  Is this use case feasible?
I have a issue related to deactivate user

I have a field deactivate reason in user object

Deactivate User should be redirect on login in portal according to deactivate reason(new field on user) field

1.If deactivate reason is 'FCRA Renew' than user should be redirect on new screen.

2.if deactivate reason is Standard than standard Deactivated message “You access is disabled. Contact your site administrator”
should be display.

But when I am query on deactivate user than it is not return the deactivate reason value.

I have login button on customer portal and its return the site.login method.

Can we query on deactivate user on login time.


class code:

global class SiteLoginController {
    global String username {get; set;}
    global String password {get; set;}

    global PageReference login() {  
        List<User> lstUser = [Select IsActive, Deactivation_Reason__c from User Where Username=:username  limit 1];
        if(lstUser.size() > 0 ){
           User oUser = lstUser.get(0);
           if(oUser.IsActive == false && oUser.Deactivation_Reason__c.tolowercase().contains('fcra') ){   
             return Site.login(username, password, '/main/deactivateuser');
           }
           else{
             return Site.login(username, password, '/home/home.jsp');
           }
        }
        return Site.login(username, password, '/home/home.jsp');
    }
    
    global SiteLoginController () {}   
}


Thanks