-
ChatterFeed
-
1Best Answers
-
0Likes Received
-
0Likes Given
-
9Questions
-
13Replies
Reports and Dashboards super badge "Locked Filter" issue.
-
- Ashok Rathva
- August 06, 2016
- Like
- 0
- Continue reading or reply
MetadataService.cls, How can I filter the Metadata List based on the Last Modified Date?
My requirement is that I need to display org metadata components (like Objects, Apex Classes, VF Pages, Record Types, Profiles, Permission Sets, Custom Object, Custom Fields, Custom Label ...etc) on my VF page. I can use MetadataService.cls to get all this info.
But is it possible to filter the List of metadata by its Last Modified date? I mean to say I need the list of all Metadata which for which the last modified date is greater than last month
Does anybody have any idea regarding this? Any ideas are highly appreciated.
Thanks
Nirav
-
- Nirav_Shah
- August 13, 2019
- Like
- 0
- Continue reading or reply
Fetch Response from API and Show it on Visualforce Page
I have created one controller in which I am getting the API response in JSON format. The JSON format is as following
{ "APIResponse": { "APIResult": { "row": [ { "SR_NBR": "1-233391976021", "SR_CREATED": "2018-04-26T13:44:25.000Z", "SR_TYPE": "Repair", . . . . . . . } ] } } }Now, my requirement is I need to show this response in proper PDF format in Visualforce page.
How to achieve this scenario?
Thanks
-
- Nirav_Shah
- June 14, 2018
- Like
- 0
- Continue reading or reply
Add TeamMemberRole from List to Set
Following is my code
List <AccountTeamMember> teamMemberList = new List <AccountTeamMember>(); Set <String> teamMemberRole = new Set <String>(); if(accountDetail.Ultimate_Parent__c && accountDetail.Parent__c){ teamMemberList = createTeamMemberList(accountDetail.Id, teamMemberRole); } else if(accountDetail.Parent__c){ teamMemberList = createTeamMemberList(accountDetail.Id, teamMemberRole); for (AccountTeamMember tm : teamMemberList){ teamMemberRole.add(tm.TeamMemberRole); } if (!teamMemberRole.isEmpty() && teamMemberRole.size() != 4){ teamMemberList.addAll(createTeamMemberList(accountDetail.ParentId, teamMemberRole)); } } else{ teamMemberList = createTeamMemberList(accountDetail.Id, teamMemberRole); for (AccountTeamMember tm : teamMemberList){ teamMemberRole.add(tm.TeamMemberRole); } if (!teamMemberRole.isEmpty() && teamMemberRole.size() != 4){ for (AccountTeamMember tm : createTeamMemberList(accountDetail.ParentId, teamMemberRole)){ teamMemberRole.add(tm.TeamMemberRole); teamMemberList.add(tm); } } } // Create Account Team Member List public static List<AccountTeamMember> createTeamMemberList (Id accId, Set <String> teamMemberRole){ Final List<String> roleList = Label.CCP_TeamMemberRole.split(','); return [SELECT User.Name, User.Email, user.Phone, TeamMemberRole, user.FullPhotoUrl, Account.Name, FROM AccountTeamMember WHERE AccountId =: accId AND TeamMemberRole NOT IN: (teamMemberRole) AND TeamMemberRole IN: (roleList) AND User.isActive = true]; } }
As you can see I have to use multiple iterations(For Loops) just to add Team Member Role to set of String, can you guys please suggest me some better way of doing this
Thanks
-
- Nirav_Shah
- May 21, 2018
- Like
- 0
- Continue reading or reply
Send Profile Photo in base64 Format
Any Ideas for this?
-
- Nirav_Shah
- March 20, 2018
- Like
- 0
- Continue reading or reply
Update field based on API response
Now, it is not feasible that I call the API each time I show the data, so how can I achieve this?
Thanks
-
- Nirav_Shah
- February 20, 2018
- Like
- 0
- Continue reading or reply
Invalid type for Http* method: HttpGet
I am trying to create the API which can fetch the data from Salesforce and send it to an external system. For that, I am using REST web services HttpGet.
Below is the code I am trying to write.
@RestResource(urlMapping='/api/*') global with sharing class DetailsController{ @HttpGet global static List<Wrapper1> getDetails() { RestRequest req = RestContext.request; RestResponse res = RestContext.response; string GO, ID; if(!string.isEmpty(req.params.get('GO'))){ GON = req.params.get('GO'); } else{ throw new Utility.applicationException('GO Cannot be null'); } if(!string.isEmpty(req.params.get('ID'))){ UCMID = req.params.get('ID'); } else{ ID = ''; } List<Wrapper1> Details = fetchDetails(GO, ID); return Details; }The Wrapper1 hear is the Wrapper class which includes another wrapper class Wrapper2 in it.
Wrapper1
global class Wrapper1 { @AuraEnabled public string GO; @AuraEnabled public string Name; @AuraEnabled public string Address; @AuraEnabled public List<Wrapper2> Fsets; public class OrderTrackingDetail{ @AuraEnabled public string Carrier=System.label.CCP_NotAvailableValue; @AuraEnabled public string TrackingID=System.label.CCP_NotAvailableValue; @AuraEnabled public string fSetNum; @AuraEnabled public string trackingURL; } }Wrapper2
public class Wrapper2 implements Comparable { public string addressCity; @AuraEnabled public string addressLine1; @AuraEnabled public string addressLine2; @AuraEnabled public string addressLise3; public string addressLine4; public string addressState; public string addressZip; public string Name; public string Country; @AuraEnabled public List<Object> object1 = new List<Object>(); @AuraEnabled public List<Object> object2 = new List<Object>(); public Integer compareTo(Object objToCompare) { integer val1 = integer.valueOf(//something); integer val2 = integer.valueOf(((Wrapper2)objToCompare).//something); if (val1 == val2) return 0; if (val1 > val2) return 1; return -1; } }
When I am trying to write the gate method I am getting the below error.
Invalid type for Http* method: LIST.Wrapper1.LIST.Wrapper2.LIST.ObjectHow to solve this error.? Please help
Thanks
Nirav
-
- Nirav_Shah
- December 12, 2017
- Like
- 0
- Continue reading or reply
Expose data to External System
I am very new to integration part.
I need to do one requirement. I have one Custom Object in which I am storing data. Now I want to expose this data to the external system. For this, as I know I need to create the API and expose it to the external system. but I am totally clueless about this.
Can you guys please send me the steps that can follow to achieve this scenario.
Thanks in advance
Nirav
-
- Nirav_Shah
- December 06, 2017
- Like
- 0
- Continue reading or reply
Deploy/Migrate Changes form Sandbox to Package Org (One Org to another org which are not connected)
I have a question,
I have created one managed package and installed it in Sandbox. Now after installing I have made some changes in Sandbox like Field Creation, Layout Update and other. Now I want to migrate those changes to my Package org.
I have tried using eclipse but because I have made changes in managed package it is not fetching that custom fields.
Is there any other way to do that except the ANT tool?
Please suggest
Thanks
Nirav
-
- Nirav_Shah
- September 17, 2016
- Like
- 0
- Continue reading or reply
Error id: NNTFJFJL : Reports & Dashboards Specialist" Superbadge Challenge 2 Create sales dashboards in Salesforce Classic
I am in the "Reports & Dashboards Specialist" Superbadge (Challenge 2 : Create sales dashboards in Salesforce Classic).
I am getting the error
Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: NNTFJFJL
I don't know what is the error but I am using the new Developer Org to complete the Superbadge
Please Advise
Thanks
Nirav
-
- Nirav_Shah
- July 21, 2016
- Like
- 0
- Continue reading or reply
Fetch Response from API and Show it on Visualforce Page
I have created one controller in which I am getting the API response in JSON format. The JSON format is as following
{ "APIResponse": { "APIResult": { "row": [ { "SR_NBR": "1-233391976021", "SR_CREATED": "2018-04-26T13:44:25.000Z", "SR_TYPE": "Repair", . . . . . . . } ] } } }Now, my requirement is I need to show this response in proper PDF format in Visualforce page.
How to achieve this scenario?
Thanks
- Nirav_Shah
- June 14, 2018
- Like
- 0
- Continue reading or reply
Add TeamMemberRole from List to Set
Following is my code
List <AccountTeamMember> teamMemberList = new List <AccountTeamMember>(); Set <String> teamMemberRole = new Set <String>(); if(accountDetail.Ultimate_Parent__c && accountDetail.Parent__c){ teamMemberList = createTeamMemberList(accountDetail.Id, teamMemberRole); } else if(accountDetail.Parent__c){ teamMemberList = createTeamMemberList(accountDetail.Id, teamMemberRole); for (AccountTeamMember tm : teamMemberList){ teamMemberRole.add(tm.TeamMemberRole); } if (!teamMemberRole.isEmpty() && teamMemberRole.size() != 4){ teamMemberList.addAll(createTeamMemberList(accountDetail.ParentId, teamMemberRole)); } } else{ teamMemberList = createTeamMemberList(accountDetail.Id, teamMemberRole); for (AccountTeamMember tm : teamMemberList){ teamMemberRole.add(tm.TeamMemberRole); } if (!teamMemberRole.isEmpty() && teamMemberRole.size() != 4){ for (AccountTeamMember tm : createTeamMemberList(accountDetail.ParentId, teamMemberRole)){ teamMemberRole.add(tm.TeamMemberRole); teamMemberList.add(tm); } } } // Create Account Team Member List public static List<AccountTeamMember> createTeamMemberList (Id accId, Set <String> teamMemberRole){ Final List<String> roleList = Label.CCP_TeamMemberRole.split(','); return [SELECT User.Name, User.Email, user.Phone, TeamMemberRole, user.FullPhotoUrl, Account.Name, FROM AccountTeamMember WHERE AccountId =: accId AND TeamMemberRole NOT IN: (teamMemberRole) AND TeamMemberRole IN: (roleList) AND User.isActive = true]; } }
As you can see I have to use multiple iterations(For Loops) just to add Team Member Role to set of String, can you guys please suggest me some better way of doing this
Thanks
- Nirav_Shah
- May 21, 2018
- Like
- 0
- Continue reading or reply
Send Profile Photo in base64 Format
Any Ideas for this?
- Nirav_Shah
- March 20, 2018
- Like
- 0
- Continue reading or reply
Invalid type for Http* method: HttpGet
I am trying to create the API which can fetch the data from Salesforce and send it to an external system. For that, I am using REST web services HttpGet.
Below is the code I am trying to write.
@RestResource(urlMapping='/api/*') global with sharing class DetailsController{ @HttpGet global static List<Wrapper1> getDetails() { RestRequest req = RestContext.request; RestResponse res = RestContext.response; string GO, ID; if(!string.isEmpty(req.params.get('GO'))){ GON = req.params.get('GO'); } else{ throw new Utility.applicationException('GO Cannot be null'); } if(!string.isEmpty(req.params.get('ID'))){ UCMID = req.params.get('ID'); } else{ ID = ''; } List<Wrapper1> Details = fetchDetails(GO, ID); return Details; }The Wrapper1 hear is the Wrapper class which includes another wrapper class Wrapper2 in it.
Wrapper1
global class Wrapper1 { @AuraEnabled public string GO; @AuraEnabled public string Name; @AuraEnabled public string Address; @AuraEnabled public List<Wrapper2> Fsets; public class OrderTrackingDetail{ @AuraEnabled public string Carrier=System.label.CCP_NotAvailableValue; @AuraEnabled public string TrackingID=System.label.CCP_NotAvailableValue; @AuraEnabled public string fSetNum; @AuraEnabled public string trackingURL; } }Wrapper2
public class Wrapper2 implements Comparable { public string addressCity; @AuraEnabled public string addressLine1; @AuraEnabled public string addressLine2; @AuraEnabled public string addressLise3; public string addressLine4; public string addressState; public string addressZip; public string Name; public string Country; @AuraEnabled public List<Object> object1 = new List<Object>(); @AuraEnabled public List<Object> object2 = new List<Object>(); public Integer compareTo(Object objToCompare) { integer val1 = integer.valueOf(//something); integer val2 = integer.valueOf(((Wrapper2)objToCompare).//something); if (val1 == val2) return 0; if (val1 > val2) return 1; return -1; } }
When I am trying to write the gate method I am getting the below error.
Invalid type for Http* method: LIST.Wrapper1.LIST.Wrapper2.LIST.ObjectHow to solve this error.? Please help
Thanks
Nirav
- Nirav_Shah
- December 12, 2017
- Like
- 0
- Continue reading or reply
Trailhead Lightning Superbadge : Automate fulfillment cancellation actions
Challenge Not yet complete... here's what's wrong:
The Fulfillment Cancellation Automation process does not appear to be working properly. Make sure that a cancelled Fulfillment updates the Adventure Package correctly.
Chose the fullfillment object
have proper conditions:
and update the adventure package
I tested it and it seems to be updating the sales price to the diposit amount correctly:
but still on checking Chellenge I get the error:
completedly stumped!!! please let me know if anybody faced the same issue. any help.
- Hemant Gothwal 1
- August 25, 2016
- Like
- 4
- Continue reading or reply
Reports and Dashboards super badge "Locked Filter" issue.
- Ashok Rathva
- August 06, 2016
- Like
- 0
- Continue reading or reply
Error id: NNTFJFJL : Reports & Dashboards Specialist" Superbadge Challenge 2 Create sales dashboards in Salesforce Classic
I am in the "Reports & Dashboards Specialist" Superbadge (Challenge 2 : Create sales dashboards in Salesforce Classic).
I am getting the error
Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: NNTFJFJL
I don't know what is the error but I am using the new Developer Org to complete the Superbadge
Please Advise
Thanks
Nirav
- Nirav_Shah
- July 21, 2016
- Like
- 0
- Continue reading or reply
Set Custom title VF page rendered as PDF
<apex:page showHeader="false" renderAs="pdf">
</apex:page>
Thanks!
- Santosh Kumbar
- March 29, 2016
- Like
- 0
- Continue reading or reply
what should i do if i got this error "Destination URL not reset"?
I am trying to upsert a salesforce by web service.
but I get the following error
↓
UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService
Any ideas?
Detail Below
【Binding Operation Property】
<implementation xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" type="Invoke">
<serverUri>※I wrote return message by login </serverUri>
<soapaction>""</soapaction>
<authenticationType>Anonymous</authenticationType>
<userId>※ Iwrote userId</userId>
<password>※ Iwrote password</password>
<host>×.×.×.×</host>
<port>80</port>
<charset>UTF-8</charset>
</implementation>
【Soap Request】
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP:Header>
<DebuggingHeader xmlns="urn:enterprise.soap.sforce.com">
<debugLevel>none</debugLevel>
</DebuggingHeader>
<DisableFeedTrackingHeader xmlns="urn:enterprise.soap.sforce.com">
<disableFeedTracking>0</disableFeedTracking>
</DisableFeedTrackingHeader>
<PackageVersionHeader xmlns="urn:enterprise.soap.sforce.com">
<packageVersions>
<majorNumber>0</majorNumber>
<minorNumber>0</minorNumber>
<namespace></namespace>
</packageVersions>
</PackageVersionHeader>
<AssignmentRuleHeader xmlns="urn:enterprise.soap.sforce.com">
<assignmentRuleId></assignmentRuleId>
<useDefaultRule>0</useDefaultRule>
</AssignmentRuleHeader>
<EmailHeader xmlns="urn:enterprise.soap.sforce.com">
<triggerAutoResponseEmail>0</triggerAutoResponseEmail>
<triggerOtherEmail>0</triggerOtherEmail>
<triggerUserEmail>0</triggerUserEmail>
</EmailHeader>
<SessionHeader xmlns="urn:enterprise.soap.sforce.com">
<sessionId>※I wrote return message by login </sessionId>
</SessionHeader>
<AllOrNoneHeader xmlns="urn:enterprise.soap.sforce.com">
<allOrNone>1</allOrNone>
</AllOrNoneHeader>
<AllowFieldTruncationHeader xmlns="urn:enterprise.soap.sforce.com">
<allowFieldTruncation>1</allowFieldTruncation>
</AllowFieldTruncationHeader>
<MruHeader xmlns="urn:enterprise.soap.sforce.com">
<updateMru>false</updateMru>
</MruHeader>
</SOAP:Header>
<SOAP:Body>
<upsert xmlns="urn:enterprise.soap.sforce.com">
<externalIDFieldName>Id</externalIDFieldName>
<sObjects xsi:type="Account">
<Fax>03-1111-1111</Fax>
<Name>AAA</Name>
<Phone></Phone>
<Id></Id>
</sObjects>
</upsert>
</SOAP:Body>
</SOAP:Envelope>
【Response Message】
<SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" >
<faultcode xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" >ns0:Server</faultcode>
<faultstring xml:lang="en-US" >UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService.</faultstring>
<faultactor>urn:enterprise.soap.sforce.com</faultactor>
<detail>
<cordys:FaultDetails xmlns:cordys="http://schemas.cordys.com/General/1.0/" >
<cordys:LocalizableMessage xmlns:cordys="http://schemas.cordys.com/General/1.0/" >
<cordys:MessageCode xmlns:cordys="http://schemas.cordys.com/General/1.0/" >Cordys.UDDI.Messages.generalException</cordys:MessageCode>
<cordys:Insertion xmlns:cordys="http://schemas.cordys.com/General/1.0/" >UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService</cordys:Insertion>
</cordys:LocalizableMessage>
</cordys:FaultDetails>
<externalFaultCode>UNKNOWN_EXCEPTION</externalFaultCode>
<sf:UnexpectedErrorFault xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xsi:type="sf:UnexpectedErrorFault" >
<sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode>
<sf:exceptionMessage>Destination URL not reset. The URL returned from login must be set in the SforceService</sf:exceptionMessage>
</sf:UnexpectedErrorFault>
</detail>
</SOAP:Fault>
</data>
- sekki
- August 25, 2011
- Like
- 0
- Continue reading or reply