• Complementary ComplementaryOne
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 5
    Likes Given
  • 1
    Questions
  • 3
    Replies
How can i round or truncate off the decimal? I don't want the decimal to show. If a user input 1.5 I want it to show either 2 or 1 so either round up or truncate off the decimal, either one works. 

Right now I have:
<lightning:input type="number"  value="{!v.customNumber__c}"/>

Any help is greatly appreciated, thank you.
 
I'm creating a case in a custom lightning component using the Lightning Data Service. If I wanted the case assignment rules to fire, would I also have to have an apex class that uses the Database.DMLOptions? I'm assuming I can't use the following directly from the javascript controller?
 
//Fetching the assignment rules on case
AssignmentRule AR = new AssignmentRule();
AR = [select id from AssignmentRule where SobjectType = 'Case' and Active = true limit 1];

//Creating the DMLOptions for "Assign using active assignment rules" checkbox
Database.DMLOptions dmlOpts = new Database.DMLOptions();
dmlOpts.assignmentRuleHeader.assignmentRuleId= AR.id;

Case newCase = new Case(Status = 'New') ;
//Setting the DMLOption on Case instance
newCase.setOptions(dmlOpts);


 
I have built a custom object that I want to use to hold roll up summary data on the Opportunity Amounts that are related to it. As you cannot use Opportunity records in a Master Detail realtionship with a Custom object, I have created a Junction object with a lookup relationship to the Opportunity, and a Master Detail relationship to the Custom Object where the roll ups will happen.

Having set up all the objects and relationships, the junctions and roll ups work, but the issue I am having is with automation. I have set up Processes that create a new junction record and copy over the relevant fields from the Opportunity (at either creation, or update to closed won), but am struggling to automate the completion of the Master Detail field on the junction object that will hold the roll ups.

I have tried copying a text formula that matches the name of existing Custom Object, but keep receiving ID errors that prevent the process running. How else could I populate the Master Detail field on the junction object when it is created?

Any suggestions that could help me make this work would be gratefully accepted.

PS: I know that another option is to use Flows, or a declarative rollup solution/roll up manager, but I am trying to see if I make this approach work.
  • July 20, 2018
  • Like
  • 1
How can i round or truncate off the decimal? I don't want the decimal to show. If a user input 1.5 I want it to show either 2 or 1 so either round up or truncate off the decimal, either one works. 

Right now I have:
<lightning:input type="number"  value="{!v.customNumber__c}"/>

Any help is greatly appreciated, thank you.
 
I'm creating a case in a custom lightning component using the Lightning Data Service. If I wanted the case assignment rules to fire, would I also have to have an apex class that uses the Database.DMLOptions? I'm assuming I can't use the following directly from the javascript controller?
 
//Fetching the assignment rules on case
AssignmentRule AR = new AssignmentRule();
AR = [select id from AssignmentRule where SobjectType = 'Case' and Active = true limit 1];

//Creating the DMLOptions for "Assign using active assignment rules" checkbox
Database.DMLOptions dmlOpts = new Database.DMLOptions();
dmlOpts.assignmentRuleHeader.assignmentRuleId= AR.id;

Case newCase = new Case(Status = 'New') ;
//Setting the DMLOption on Case instance
newCase.setOptions(dmlOpts);


 
Hello --

We're trying to configure the Create Case Form component in Lightning Communities, which contains a Language selection picklist. We have other Custom Components on the same page which contain language data already selected by the Community user.

Anyone found a way to feed data into a standard component, in this case allowing pre-selection of the language picklist? Either this can't be done or I'm missing something obvious. The Case Create Form is relatively new (I believe) so don't know how many people have tried to configure it. 

All ideas welcome! Thanks in advance.
Hi, I currently have the code below
<td data-label="TESTING"><lightning:input type="number" min="0" label="" name=" " value="{!v.testint.test__c}"/></td>
I don't want any decimals, so if there is a decial a error will show up, as seen in the pic below 
User-added image
I also have a Next button at the bottom of the page. Is it possible to make the page stay on the current page when a error such as the above shows up? And only allow the page to go to the next section when the number have been changed from a decimal to a whole number, or when there are no errors shown.