function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amit MAmit M 

Created Flow using Metadata API but unable to see

Hi I have created a flow using following code


MetadataService.MetadataPort service = createService();
MetadataService.Flow flow = new MetadataService.Flow();
flow.fullName = 'My_Flow-1';
flow.label = 'My Flow';
flow.description= 'This is a test floe';
MetadataService.FlowStep step = new MetadataService.FlowStep();
//step.metaType = 'FlowStep';
step.locationY = 10;
step.description = 'Step description';'test step';

//MetadataService.AsyncResult[] results2 = service.create(new MetadataService.FlowStep[] { step });

flow.steps = new MetadataService.FlowStep[]{step};

//MetadataService.AsyncResult[] results = service.create(new List<MetadataService.Metadata> { flow });
MetadataService.AsyncResult[] results = service.create(new MetadataService.Flow[] { flow });


I get an id like 04sd0000002iQXvAAM in AsyncResult. But I am unable to see the flow in Salesforce.


2ndly, Can you also tell me how do i get the id with which I can access the flow using url like