From f30f84fe7b1d09ee63a1f2a1d5c8cb303e31669a Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 25 四月 2023 17:47:26 +0800
Subject: [PATCH] 修改失单页面

---
 force-app/main/default/classes/lexPCLLostReportLwcController.cls |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 2127ee4..776380d 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -353,6 +353,31 @@
 		return dataCheck;
 	}
 	@AuraEnabled
+	public static List<String> getValuesFromTable(){
+		String ObjectApi_name = 'PCLLostBrand__c';
+		String Field_name = 'Lost_By_Company__c';
+		List<String> lstPickvals=new List<String>();
+        //From the Object Api name retrieving the SObject
+        Schema.SObjectType targetType = Schema.getGlobalDescribe().get(ObjectApi_name);
+        Sobject Object_name = targetType.newSObject();
+         //grab the sobject that was passed
+        Schema.sObjectType sobject_type = Object_name.getSObjectType();
+        //describe the sobject
+        Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe(); 
+         //get a map of fields for the passed sobject
+        Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();
+        //grab the list of picklist values for the passed field on the sobject
+        List<Schema.PicklistEntry> pick_list_values = field_map.get(Field_name).getDescribe().getPickListValues(); 
+        
+        for (Schema.PicklistEntry a : pick_list_values) 
+        { //for all values in the picklist list
+        
+            lstPickvals.add(a.getValue());//add the value  to our final list
+           }
+
+          return lstPickvals;
+	}
+	@AuraEnabled
 	public static list<LostBrand> brandcopy(){
 		list<LostBrand> tempbrands = new list<LostBrand>();
 		for(LostBrand tempbrand: LostReport.LostBrands) {

--
Gitblit v1.9.1