• Mohammad Asim Ali
  • NEWBIE
  • 9 Points
  • Member since 2014
  • Application Development Specialist

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 10
    Replies
Hi,

I need to be able to retrieve certain parameters from the SAML response when user gets SSO error during JIT. This will be used to perform / show specific messages to the user in custom error url vf page.

Any suggestions?
I believe this is related to cross-object validation. Is it possible to create a validation rule on ObjA, which will validate a value of field ObjA.FieldA whether any record exists in ObjB with the same value in ObjB.FieldB?

I can't use apex code because ObjB has more than 50 million records. Currently there is no relationship between the two objects, but I can create one based on suggestions from you experts.
Hi,

I want to reorder the data category groups as it appears in the article management tab and while creating the draft article. Even though in the data category setup I was able to order them as per preference but in the draft article creation its just random, it doesn't even follow any pattern, alphabetical or otherwise.
I have tried to deactivate and then reactivate to get the proper order and it worked fine in the data category setup but the order in the draft article creation page is just random.
Any suggestions are welcome.
I believe this is related to cross-object validation. Is it possible to create a validation rule on ObjA, which will validate a value of field ObjA.FieldA whether any record exists in ObjB with the same value in ObjB.FieldB?

I can't use apex code because ObjB has more than 50 million records. Currently there is no relationship between the two objects, but I can create one based on suggestions from you experts.
Hi,

I want to reorder the data category groups as it appears in the article management tab and while creating the draft article. Even though in the data category setup I was able to order them as per preference but in the draft article creation its just random, it doesn't even follow any pattern, alphabetical or otherwise.
I have tried to deactivate and then reactivate to get the proper order and it worked fine in the data category setup but the order in the draft article creation page is just random.
Any suggestions are welcome.
I'm developing a visualforce which after query an opportunity displays a modal and the modal has a button to close itself but I want to close it automatically, does anyone knows how to do it?

My apex code is 
public without sharing class RegistroCitas {
	
    Public String correo{get; set;}
    Public List<Account> cuenta = new List<Account>();
    Public List<Oportunidad_Univer__c> oportunidad = new List<Oportunidad_Univer__c>();
	Public PageReference pageRef = ApexPages.currentPage();
    public boolean displaySuccesPopup {get; set;}
    public boolean displayFailedPopup {get; set;}
    public boolean boleano {get; set;}
    
    public RegistroCitas(){
        displaySuccesPopup = false;
        displayFailedPopup = false;
    }
    
    public PageReference registrarCita(){
        cuenta = [SELECT Acc_Asistio__c FROM Account WHERE PersonEmail =: correo];
        if(cuenta.isEmpty()){
            displayFailedPopup = true;
            correo = '';
            return null;
        }else{
            //Si hay cuenta
            oportunidad = [SELECT Id, Name, Opp_Atendio_cita__c ,CreatedDate FROM Oportunidad_Univer__c WHERE Opp_Cuenta__c =: cuenta[0].Id ORDER BY CreatedDate DESC LIMIT 1];
            if(oportunidad.size() < 1){
                displayFailedPopup = true;
                correo = '';
                return null;
            }else{
             	oportunidad[0].Opp_Atendio_cita__c = True;
            	cuenta[0].Acc_Asistio__c = True;
            	update oportunidad;
            	update cuenta;	
                displaySuccesPopup = true;
                correo = '';
            	return pageRef; 
            }
        }
    }
    
    public void closePopup(){
        displaySuccesPopup = false;
        displayFailedPopup = false;
    }
}

and te visualforce is 
<apex:page>
	<apex:form >
		<div class="container">
            <div class="cabecera centrado">
                <div class="imagen">
                    <apex:image url="{!URLFOR($Resource.images, 'images/logoUniver-Blanco.png')}" width="500" height="100" />
                </div>
            </div>
            <div class="margen centrado">
				<h1 class="grande">Registro para Citas Agendadas</h1>
                <p><u>Favor de ingresar su correo electrónico</u></p>
                <apex:inputText value="{!correo}"/><br/>
                <br/>
            	<apex:commandButton value="Enviar" action="{!registrarCita}"/>
            </div>  
		</div>
	</apex:form>
    
    <apex:form >
        <apex:outputPanel id="tstpopup">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displaySuccesPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displaySuccesPopUp}">
                ¡Tu cita ha quedado registrada! :)<br/><br/><br/>
                <apex:commandButton value="Cerrar" action="{!closePopup}" rerender="tstpopup"/>
            </apex:outputPanel>
            <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayFailedPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayFailedPopUp}">
                No se encontró su cita, favor de buscar asistencia de parte de nuestro equipo en recepción.<br/><br/><br/>
                <apex:commandButton value="Cerrar" action="{!closePopup}" rerender="tstpopup"/>
            </apex:outputPanel>
        </apex:outputPanel>
 
    </apex:form>
</apex:page>

 
Hi, Javascript is blocked in hyperlink with Spring 2017. The problem I have is with an existing link that works for both normal and cosole view. Now, i'm not allowed to check for typeof(ScrUp); I'm not able solve this problem by creating an empty Visualforce page and an Apex controller followed by pass the required values from the link to controller, execute the logic to decide the URL in controller method and perform the redirect. The problem is that the new vf page itself opens in a new tab like a new window in both normal and console view. Please share your inputs on how I can fix this. Thanks
Hi..
I need to make inactive all the  triggers in my org  using coding only.. Anybody have any idea?
To complete this challenge, you need to identify locations in code where cross-site scripting is possible. Navigate to the Built-In XSS Protections Challenge tab within the Cross-site Scripting (XSS) application. You will see text output corresponding to merge fields in the Visualforce code. Locate any usage of the merge field "{!sampleMergeField}". Edit the code comment beneath the merge field to indicate whether or not this code block is vulnerable to cross-site scripting. For instance:
-If the code is vulnerable, the comment should appear as <!-- Line 10 is vulnerable to XSS: YES -- >
-If the code is not vulnerable, the comment should appear as <!-- Line 10 is vulnerable to XSS: NO -- >

I am getting following error
Challenge Not yet complete... here's what's wrong:
Looks like you incorrectly identified some potential cross-site scripting vectors. Please try again.

Please help me to complete this challenge
 
I have a unit test that is throwing UNABLE_TO_LOCK_ROW when it is doing an insert. I don't understand why that should happen. Here's the code (excerpted). The exception is thrown on the insert statement. Because this is a new record, and contained within a test class, how can it throw a UNABLE_TO_LOCK_ROW exception?

@istest
private class MyTest {
    ...
    theQuote = new Quote(Name='Test Quote',
                         OpportunityId = theOpp.Id,
                         Term__c=12,
                         pricebook2id=thePricebook.id);
    insert theQuote;
    ...
}


https://success.salesforce.com/0693000000325re

 

Please Help. A screen Shot Is attached of what I wish to re order.. I wish to re-order the Data Category Group.. 

I got the SSO working in my org. Is there a way to pass parameters from the Auth.SamlJitHandler class to the Custom Error URL?

From reading the documentation and other research, all I got was the different error codes (1-42) we get on different scenarios. But, nothing on capturing paramters to use on the error page.

What I'd like to do is capture the username that's coming in through the SAML response and pass that to a custom visualforce page (referenced in the Custom Error URL in the SSO settings) for downstream processing.

More context: This is SSO into the Salesforce Community. The above is to redirect the user to a custom VF page for self registration with the username pre-populated, in an event of a SSO failure.