• Ayush Kumar 31
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 3
    Replies

I've a ui:inputNumber field in lightning component. But this strangely takes input as "+, b, m, k, t". Now I want to restrict it using client side validation.

I've tried NaN and a couple of other methods but still stuck with it. Can anyone help here, as how to write code on controller side?

ui:inputNumber accepting "+", can anybody help with the code in lightning?
While running a test class for below piece of code it hits exception at the Bold part of the code, can anyone help??
for(PP_RequestToFill_Master__c obj: poslist){          
                Approval.ProcessWorkitemRequest req = new Approval.ProcessWorkitemRequest();           
                req.setComments(ApprovingRequest);
                req.setAction(Approve);                    
                ProcessInstanceWorkitem workItem = getWorkItemId(obj.id);  
                system.debug('workitem'+workItem);
                if(workItem.Id == null)                                    <----------------------Here exception is thrown and the code stops executing further
                {
                    obj.addError(TriggerError);
                    outputResult = false;                
                }
                else
                {
                    req.setWorkitemId(workItem.Id);
                    Approval.ProcessResult result =  Approval.process(req);
                    outputResult = result.isSuccess();
                }
            }
I've below code and while running it from Test class only the code in Bold gets covered but the italics is left uncovered. Can anyone help? It should run all the statements inside loop?

if(ppterm.size()>0){
            if( ppterm[0].PP_Term_Approval_Status__c == 'Updated in SAP'|| ppterm[0].PP_Term_Approval_Status__c == 'Closed'){
                country = ppterm[0].PP_Term_Approval_Status__c + '/' + term.PP_Country__c;
                return country;
            }else if(ppterm[0].PP_Term_Approval_Status__c != null && ppterm[0].PP_Term_Approval_Status__c != 'submitted'){
                country = 'No_Termination_Access' + '/' + term.PP_Country__c;
            return country;

            }
            ppterm[0].PP_First_Name__c = term.FirstName;
            ppterm[0].PP_Last_Name__c = term.LastName;
            ppterm[0].PP_Emp_Original_Hire_Date__c =  term.PP_Hiring_Date__c;
            ppterm[0].PP_Emp_Global_ID__c = term.PP_ABI_Global_ID__c;
            ppterm[0].PP_Emp_PersID__c = string.valueOf(term.PP_Employee_Number__c);
            ppterm[0].PP_Emp_DOB__c = term.PersonBirthdate;
}
While creating a webmerge template I'm facing this issue "Sorry, but you did not upload a file with merge fields". Any help?
Thanks
I'm trying to run test from dev console and getting error "Failed to run tests synchronously.: admin operation already in progress".
Can any one help, as how to resolve it?

Thanks
Is there any way to dynamically change the label used in mail template based on the country code of the receipient. For example UK and US have language as English but the spelling of words differ, so can it be achieved?
I've two methods that query on Account and a custom object, and I need values from both of them to initialize attributes on component. Can any one help to achieve this?
The code should be reusable and could be extended to other countries. Can Any one help me with the usage of custom label here. Thanks
I've two methods that query on Account and a custom object, and I need values from both of them to initialize attributes on component. Can any one help to achieve this?

I've a ui:inputNumber field in lightning component. But this strangely takes input as "+, b, m, k, t". Now I want to restrict it using client side validation.

I've tried NaN and a couple of other methods but still stuck with it. Can anyone help here, as how to write code on controller side?

I've two methods that query on Account and a custom object, and I need values from both of them to initialize attributes on component. Can any one help to achieve this?