Hi CRM Newbie 2018,
Those two fields are not available for use via basic workflow or advanced find (filters), but are visible via Advanced find columns for export and re-import. so it depends what method you want to use to get those two fields.
You can use JScript variables to get the ID's of the business process flows OnLoad or OnChange of the field; for example:
var ProcessID = Xrm.Page.getAttribute(“processid”).getValue();
var StageID = Xrm.Page.getAttribute(“stageid”).getValue();
Once you have the stage ID's, you can set IF statements to set the stage name based on the ID's of the stages. (If you need to see what the stage ID's are, you can get them from Advanced Find by adding these columns into the view).
You can also use C# to get these fields via custom workflow and use them to push through the stage names and ID's.
First, request the input parameter (if its case, then request cases, if its opportunity, request opportunities):
[RequiredArgument]
[Input("Case")]
[ReferenceTarget("incident")]
public InArgument<EntityReference> Case { get; set; }
Once you have the input, you can pass it through as the current context and grad the fields from it:
EntityReference CaseEntity = this.Case.Get(executionContext);
Entity CaseEntityRef = service.Retrieve(CaseEntity.LogicalName, CaseEntity.Id, new ColumnSet("stageid", "processid"));
Once you have the fields, you can set these fields into the same entity as an update OR use variables to set the stage names.
If you only need a view on the stage, then create the system/personal view and use the relational Process Stage(Process Stage) entity to bring through the Process stage name and stage category columns. You can, as discussed earlier, bring through the Stage ID's from the primary entity you are using and use them to match to the stage names.
Once you have a view, you can use export for re-import to update the fields if its a once off requirement.