You need to sign in to do that
Don't have an account?
Christopher Pezza
Passing Variable of null when its not
It wont pass the Id to the Variable any reason why or that i am missing
public void AttachLoan() { System.debug('** in Add'); System.debug('**' + AddLoanID); LLC_BI__Loan__c ul = [SELECT Id, Name, LLC_CDS__Deal_Facility__c FROM LLC_BI__Loan__c WHERE Id = :AddLoanID LIMIT 1]; system.debug('** ' + ul); ul.LLC_CDS__Deal_Facility__c = ObjId; system.debug('**2 ' + ul); update(ul); }
<apex:repeat value="{!AddLoans}" var="fa"> <tr> <td> <apex:form > <apex:commandButton value="Add" action="{!AttachLoan}" styleClass="btn btn-xs btn-success"> <apex:param value="{!fa.Id}" AssignTo="{!AddLoanID}"/> </apex:commandButton> </apex:form> </td> <td><a href="/{!fa.Id}" target="_Blank">{!fa.Name}</a></td> <td>{!fa.LLC_BI__lookupKey__c}</td> <td><a href="/{!fa.LLC_BI__Account__c}" target="_Blank">{!fa.LLC_BI__Account__r.Name}</a></td> </tr> </apex:repeat>
Try adding rerender attribute to commandbutton. If you do not want to rerender any panels simply add rerender="dummy" on command button. That should resolve this issue.
Please let me know if this helps!
Thanks
Thanks