You need to sign in to do that
Don't have an account?
Ben Merton 15
Arithmetic expressions must use numeric arguments at line 45 column 50
I am trying to do a multiplication between a string and a method called using the dot notation:
indent.Indent_Quantity__c = item.Quantity__c*woquantity;
It is saying that "Arithmetic expressions must use numeric arguments
Can you help?
Full code below...
indent.Indent_Quantity__c = item.Quantity__c*woquantity;
It is saying that "Arithmetic expressions must use numeric arguments
Can you help?
Full code below...
public class CreateIndentController{ string workOrderId; string productId; string woquantity; public CreateIndentController() { workOrderId = ApexPages.currentPage().getParameters().get('id'); productId = ApexPages.currentPage().getParameters().get('productId'); woquantity = ApexPages.currentPage().getParameters().get('quantity'); System.debug('Product ID 1' + productId); System.debug('Work Order ID 1' + workorderId); } public pageReference onLoad() { List<Material_Request__c> indents = new List<Material_Request__c>(); for (BOM_Item__c item : bomItems) { Material_Request__c indent = new Material_Request__c(); indent.Work_Order__c = workOrderId; indent.Indent_Quantity__c = item.Quantity__c*woquantity; indent.Good_Service__c = item.GSI_No__c; indents.add(indent); } if (indents.size() > 0) { insert indents; } return new PageReference('/' + workOrderId); } }
All Answers
Please let us know if this will help you
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_integer.htm