• Alejandro Ruz Carrasco
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I have a webservice that logs to Salesforce, and keeps track in memory of the session expiration by getting the value of loginResult.userInfo.sessionSecondsValid from the SFDC LoginResult part of the WSDL Enterprise API, adding the seconds to a static DateTime object for future evaluations at runtime.

In the development and testing stages (from lots of different workstations and webservers) I had no problems, but after installing it to production I realized that it was login in on each WebMethod call.

I thought the static variable was losing its value, and posted a question in SO about it.

By debugging the condition that determined if there was a need for retrying the login in the production box, i realized that loginResult.userInfo.sessionSecondsValid returned as zero, and checking in my local workstation and other development servers the value correctly returned as 7200 (2 hours for session expiration in our org).

What could cause the difference in the expiration times? some security setting perhaps? Could the server in question be blacklisted in any way?
We're having a strange situation, kinda hard to follow up.

We have two validation rules on Accounts, basically they validate if a calculus over a value results in the second value.

On accounts we use two recordtypes, and each recordtype has its corresponding validation rule to evaluate.

Also, the fields evaluated in each validation rule are different, and are only shown in their respective page layout.

For some users, both validation rules are being evaluated, thus failing the account creation.

This are the validation rules:
 
IF( RecordType.Name = "Cuenta personal",
IF (
CASE( (11 - ( Validacion_RUT_1_Persona__c - Validacion_RUT_2_Persona__c )) , 1,"1",2,"2",3,"3",4,"4",5,"5",6,"6",7,"7",8,"8",9,"9",10,"K",11,"0", "ERROR" )
= mid ( Rut_contacto__pc & "-" & UPPER(DV_contacto__pc) , len(Rut_contacto__pc & "-" & UPPER(DV_contacto__pc)) , 1 )
, FALSE, TRUE )
,FALSE)
IF ( RecordType.Name = "Cuenta Corporativa",
IF (
CASE( (11 - ( Validacion_RUT_1__c - Validacion_RUT_2__c )) , 1,"1",2,"2",3,"3",4,"4",5,"5",6,"6",7,"7",8,"8",9,"9",10,"K",11,"0", "ERROR" )
= mid ( Rut__c & "-" & UPPER(DV__c) , len(Rut__c & "-" & UPPER(DV__c)) , 1 )
, FALSE, TRUE )
,FALSE)
My guess and analysis shows that always both validation rules, irregardless of the recordtype, are evaluated, and given that the fields in one of them are empty the validation fails, halting the creation process.

But that doesn't explain how most of our users don't have this problem and only a handful are experiencing this.

I've tried with all the browsers, both POSTs send the recordtypeid, and a coworker right next to me, filling the fields and saving the account, entering the same values as i did, created the account successfully.

Should i create a case for this?

Thanks in advance
We're having a strange situation, kinda hard to follow up.

We have two validation rules on Accounts, basically they validate if a calculus over a value results in the second value.

On accounts we use two recordtypes, and each recordtype has its corresponding validation rule to evaluate.

Also, the fields evaluated in each validation rule are different, and are only shown in their respective page layout.

For some users, both validation rules are being evaluated, thus failing the account creation.

This are the validation rules:
 
IF( RecordType.Name = "Cuenta personal",
IF (
CASE( (11 - ( Validacion_RUT_1_Persona__c - Validacion_RUT_2_Persona__c )) , 1,"1",2,"2",3,"3",4,"4",5,"5",6,"6",7,"7",8,"8",9,"9",10,"K",11,"0", "ERROR" )
= mid ( Rut_contacto__pc & "-" & UPPER(DV_contacto__pc) , len(Rut_contacto__pc & "-" & UPPER(DV_contacto__pc)) , 1 )
, FALSE, TRUE )
,FALSE)
IF ( RecordType.Name = "Cuenta Corporativa",
IF (
CASE( (11 - ( Validacion_RUT_1__c - Validacion_RUT_2__c )) , 1,"1",2,"2",3,"3",4,"4",5,"5",6,"6",7,"7",8,"8",9,"9",10,"K",11,"0", "ERROR" )
= mid ( Rut__c & "-" & UPPER(DV__c) , len(Rut__c & "-" & UPPER(DV__c)) , 1 )
, FALSE, TRUE )
,FALSE)
My guess and analysis shows that always both validation rules, irregardless of the recordtype, are evaluated, and given that the fields in one of them are empty the validation fails, halting the creation process.

But that doesn't explain how most of our users don't have this problem and only a handful are experiencing this.

I've tried with all the browsers, both POSTs send the recordtypeid, and a coworker right next to me, filling the fields and saving the account, entering the same values as i did, created the account successfully.

Should i create a case for this?

Thanks in advance