Open new VF page from Command Button on a VF page
I have requirement where in onclick of command button a Pop-up VF is required to open where in user will Find the new user using the Custom application which i have already developed in Apex and VF.
Now the User which comes as a result of search on new VF page, User will select the checkboxes in front of them and click save.
On click of Save, the new window should get closed and the selected on the selected user should get added onto the previous page from where i opened the VF page of searching the user.
Any help will be greaatly appreciated.
Summer 19' Issue: Failed to save Component.cmp Invalid definition for null:ComponentController: field__c, ManagerId FROM User ^ ERROR at (...) No such column 'ManagerId' on entity 'User'
For us arrived with issues...
After the new release enters, in all our Components, related with "User" we receive this error:
Failed to save TestUserError_Deletar.cmp: Invalid definition for null:TestUserErrorController: Field__c, ManagerId FROM User WHERE Id =:UserInfo.getUserId() ^ ERROR at Row:1:Column:74 No such column 'ManagerId' on entity 'User'.
We try security configuration, try without sharing class.
Only works when we use only custom fields in the query.
Any one face this error?
XML For Creating/Updating New Records
I am trying to plan out an integration with a third-party system and I need a sample XML for when a new record is created/updated in Salesforce (e.g. a new Account is created or a Contact record is updated). I know where to find the general XML schema but will need more than than just this. Is there a way to get a sample XML that I require?
Thanks for your help in advance.
Inline vf page issue
Is there any way to show inline visualforce page in edit mode as well?
Like if I have an object "Recipe", now for recipe preperation steps, I am using inline vf page. Once the steps are enterd, now if that recipe is in edit mode, then inline vf page is not showing.
Thanks in advance!
Automatic Approval Escalation Difficulties
EDIT: I have updated this posting with a subject that is more indicative of what I am trying to achieve.
Automatically escalate a custom object record if it has not been approved after 24 hours (approval process escalation). When this record is created, it is automatically submitted into an approval process. If the original approvers have not approved/rejected the record after 24 hours, the record should be automatically reassigned to a different approver where it will sit for however long it takes for approval/rejection.
Note: Status field has the following values: New, Pending Approval, Approved, Rejected
- Record created in custom Visualforce GUI
- Upon save, Apex extension submits the record to an approval process
- First step of the approval process updates a Status field on the record, changing it from "New" to "Pending Approval"
- 24-hour time-based workflow in place which updates a checkbox, "Escalated", if the record is still in the "Pending Approval" Status (Currently, does not fire)
- Apex trigger fires after record is updated calls Apex class method if "Escalated" checkbox is true. This Apex method should have the ability to:
- Cancel current approval process and resubmit to escalation approval process - OR-
- Manipulate the record's current state in the existing approval process so that a different User/Group is responsible for approval/rejection
- (I think the first method is possible with Apex, but I'm not too sure about the second method)
I believe the problem lies in the order of execution between steps 3 and 4. For whatever reason, the workflow in step 4 never fires after the record is updated via approval process. However, it will fire when I manually change a "New" record's Status to "Pending Approval".
I was hoping that there was a better way to go about this auto-escalation (perhaps within the point-and-click configuration) but haven't found a solution. Is there a better approach (ideally, a working approach :smileyhappy:) out there?
Thanks in advance!
Http callouts and cookies using Apex
HttpRequest req = new HttpRequest();
HttpResponse res = h.send(req);
string loc = res.getHeader('Location');
if (loc.indexOf('sid=') > -1)
string sid = loc.substring(loc.indexOf('sid=')+4, loc.indexOf('je=')-1);
req = new HttpRequest();
res = h.send(req);