• Oshin Agrawal
  • NEWBIE
  • 95 Points
  • Member since 2019

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
Hi,
I JUST WANT SOME SMALL MODIFICATIONs,,,AND ADD SOME VALIDATIONS

Like in Name if i will give null input it will throw the error “INVALID NAME”. Like phone number  if i will give null input it will throw the error “INVALID phone"
User-added imageLaptop Warranty is my custom object 


User-added imagenow this code only sends the info to the given mail but I want the content to go into a separate custom object field as email body.
Hi,
I JUST WANT SOME SMALL MODIFICATIONs,,,AND ADD SOME VALIDATIONS

Like in Name if i will give null input it will throw the error “INVALID NAME”. Like phone number  if i will give null input it will throw the error “INVALID phone"
User-added imageLaptop Warranty is my custom object 


User-added imagenow this code only sends the info to the given mail but I want the content to go into a separate custom object field as email body.
Write a Trigger when Admin creating new user if he select chekbox (create new ReadEditPermissionset on Account) assign that permission to that new user,if systemAdministrator deselect ,Remove that permission.
I have two custom object Resource__c and Leave__c. Leave__c has lookup with Resource__c.
In Resource there are two custom field Total_Allocated_Paid_Leaves__C and Total_Used_Paid_Leaves__c.
Where Leave__c object has one custom field Leaves__c.
I want trigger on
If i entered +ve value in Leaves__c (Leave__c's field) it will add in Total_Allocated_Paid_Leaves__C (Resouce__c's field)
and if i enterd -ve value in  Leaves__c (Leave__c's field) it will add in otal_Used_Paid_Leaves__c.
Hi All,

I am using tessract.js for converting images to text but it is giving error in lightning component.


I have also tried to use as a static resource but it is still giving error.

Anyone know how to convert images to text in lightning component.
Below is my code.

Component
<aura:component implements="lightning:actionOverride,force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global">


    <ltng:require scripts="https://cdn.rawgit.com/naptha/tesseract.js/1.0.10/dist/tesseract.js"/>
    
    
    
    
    <lightning:layout>
        <lightning:layoutItem padding="around-small" size ="12">
            <div aria-labelledby="newexpenseform">

                <fieldset class="slds-box slds-theme--default background" size ="12">
					
                  
                    <div class="slds-align_absolute-center slds-p-top_x-large">

                        <lightning:input type="file" 
                                         aura:id="file" 
                                         variant="label-inline" 
                                         name="file" 
                                         onchange="{!c.hulk }"/>  
                    </div>

                   
                    
                    
                </fieldset>
            </div>
        </lightning:layoutItem>
    </lightning:layout>
</aura:component>

Controller
({
	 hulk: function (component, event,helper) 
    {
         var files = event.getSource().get("v.files");
         alert(files);


         console.log(files);
		
         Tesseract.recognize(files).then(function(result)
         {
             console.log(result.text);
             alert(result.text);
         });
  		
        $A.enqueueAction(action);
	}
})

Thanks in advance
 
I want to display current year along with previous year in my pickilist value by using formulafield.Currently I am using the  "TEXT(YEAR(TODAY())) " formula field , but I want  a formula to display current & previous year ,any help ?
I am working on one trigger where I need to concatinate two fields and populate in third field.
On hed__Course_Offering__c object, I want to concatinate hed__Course__c and hed__Term__c field and need to populate on Name field. I tried below trigger.
trigger ModuleOfferingName on hed__Course_Offering__c (before insert) {
    for(hed__Course_Offering__c con : trigger.New){
        string nameupd = '';
        nameupd += con.hed__Course__r.Name +','+ con.hed__Term__r.Name ;
        con.Name = nameupd;
}
}
The issue is its populating but the hed__Course__c and hed__Term__c are lookup fields so its populating ids but I want names to populate. Can anyone help me out in this issue please.
 
Hi
i have created a lightning datatable and in that i have a column that displays text formula field. But the table shows html instead of image. Any solution for this??

Thanks